General :: Call Putty / Plink To Start A Remote SSH Linux Script With User Input

Jun 27, 2011

Seemingly simple question, which yields slightly undesired results. Execute putty to start a script on a remote linux server which requires user input The remote script does a read -p "Please enter name" NAME I can use plink to execute a script over SSH, the following attempts and problems are shown below :-
Note the -load ns is to load a session that doesnt exist, ie ensure no defaults are used

1) plink.exe -load ns <ip_addr> -l <user> -pw <password> <script path/name> Problem) Doesn't allow/show user input, ie its non-interactive.

2) Add -t to allocate a pty :- plink.exe -t -load nc <ip_addr> -l <user> -pw <password> <script path/name> Problem) Ok, so now the user input can be seen, but I get Ctrl+H (^H) when backspace is pressed, ok if the user doesnt make a mistake!

3) Use putty instead with a saved session putty.exe -load "SavedSession" Problem) (a) Get a new window opened, not a biggy, but not as nice. (b) saved session cannot be easily moved. (c) Get password prompt, cannot provide password like with plink, I know I know, use keys, but this is a closed, private network, and its easier not to bother with keys!

So ideally, I would like the SSH to execute in-line, that is from within the batch file/command line shell I am in, not prompt for username/password, run the linux script and allow prompts and delete/backspace to work.

View 1 Replies


ADVERTISEMENT

General :: Call Putty/plink To Start A Remote SSH Script With User Input?

Jan 18, 2010

Execute putty to start a script on a remote linux server which requires user input The remote script does a read -p "Please enter name" NAME I can use plink to execute a script over SSH, the following attempts and problems are shown below :- Note the -load ns is to load a session that doesnt exist, ie ensure no defaults are used

1) plink.exe -load ns <ip_addr> -l <user> -pw <password> <script path/name> Problem) Doesn't allow/show user input, ie its non-interactive.

2) Add -t to allocate a pty :- plink.exe -t -load nc <ip_addr> -l <user> -pw <password> <script path/name> so now the user input can be seen, but I get Ctrl+H (^H) when backspace is pressed, ok if the user doesnt make a mistake!

3) Use putty instead with a saved session putty.exe -load "SavedSession" Get a new window opened, not a biggy, but not as nice. (b) saved session cannot be easily moved. (c) Get password prompt, cannot provide password like with plink, I know I know, use keys, but this is a closed, private network, and its easier not to bother with keys!I would like the SSH to execute in-line, that is from within the batch file/command line shell I am in, not prompt for username/password, run the linux script and allow prompts and delete/backspace to work.

View 5 Replies View Related

General :: Start Gqview From Windows Over SSH With Putty / Plink

Jan 10, 2010

I'm trying to figure out how to start/stop gqview remotely from a batch script on a windows machine. Stopping works with killall but starting gives me a
Code: Gtk-Warning **: cannot open display warning.
Is this because it tries to open a GUI in the terminal and if so how to solve this?

View 4 Replies View Related

General :: Opening Xterm Session On Linux Through Remote Putty

Nov 25, 2010

I have X Window running on one of RHEL Machine 192.168.2.2.I have logined through putty from remote Windows Machine 192.168.2.5. Now What I need to open the xterm (if I run the command through putty it should open xterm in the linux Machine).

View 2 Replies View Related

Programming :: Run The Scripts On Remote System Using Plink?

Nov 6, 2009

I want to run the scripts on remote system using plink. Here I am using pipes concept .I created two pipes And I want to handle the output and error in two different files. If host key (available in /.putty/sshhostkeys file) is not available or is not match then we will get "Store key in cache? (y/n)" message from child process into error file. If parent process reads this message then we will send "yes" if not then we will continue to next step and parent process will wait until exit child process .

In this bug case, host key did not match and response came late from child process into error file and parent process took it as host key already available and waiting for exit status of child process using waitpid(). But here "yes" did not send for running commands and exit the child process.Hence it is hanged at waitpid(). Please help me how to solve this issue.

I tried this in following way:

#include<stdio.h>
#include <unistd.h>
#include <sys/types.h>

[code]....

View 1 Replies View Related

General :: Connecting Linux Box Using Putty

Jul 16, 2011

I have a problem in connecting a new Linux box using putty.I have recently set up a new virtual machine using oracle virtual box , and in the virtual box i installed Cent OS 4.8 . I gave NAT connection.When i try to connect the Linux box using putty , i get Network connection Timed out message . When i try to ping from the host OS i get request timed out.

View 4 Replies View Related

General :: Linux CLI Through Putty / Do Colors Signify Anything?

Jan 14, 2010

When I connect to a RHEL CLI via Putty, some folders are blue, some are highlighted green, etc etc.Does all that signify something? Is there a link to a site that tells me what it all means?

View 9 Replies View Related

General :: Executing A Video From Putty (remote Control Vlc)

Jan 5, 2011

I am out of ideas of how to run videos at a remote machine that has a display. I have a debian system with gnome installed and everything is set up but I just don't now how to start the video over anything. I have tried simply to start #vlc video file - but this way it thinks that I want to run it in my bash over at a nother computer. I tried installing vnc but this just ports a new desktop and masically is a terminal which does not give me any control over the display.

View 7 Replies View Related

General :: Import A SQL Server 2005 Database From System To Remote Ubuntu Using Putty?

Jun 5, 2011

I have a database in SQL Server 2005 in my local Windows System and I want to import this database to my linux (ubuntu) server remotely using putty.

View 5 Replies View Related

General :: Windows With Putty Via USB Serial Cable To Serial Port - Output Ok, Input Isn't?

Jan 13, 2010

I am trying to get two way serial communications going between a Windows XP system and a Linux system (RHEL 5).I have /sbin/agetty -L 9600 ttyS0

in /etc/inittab. I am using a generic USB to serial adaptor on Windows (Unitek) and a null modem cable. I have putty configured for 9600 baud, 8 bits, no parity, one stop bit, no flow control.I get the login prompt from agetty in the putty window but input does not work; I see weird characters in the putty screen. I can echo output into the device from windows and see it, but

cat < /dev/ttyS0. just prints out weird characters from what I type.

View 3 Replies View Related

OpenSUSE :: Putty Connection Manager Like App In Linux

Feb 2, 2010

This app embeds putty and allows you to save ssh and telnet connections (including post login commands). You can also save the connections and sort them however you like. It's great for organizing linux clustered servers etc... Tabs are also a plus (yes I know konsole does this part as well)So to the point at last. I finally upgraded to OpenSuSe 11.2 and I was looking for an app that does much the same thing.

View 2 Replies View Related

Software :: Terminal Functions For Linux Like Putty Or Kitty

Feb 19, 2011

I Just recently switched all my desktops to Linux from windows, on windows i used kitty URL...,but in Linux terminal i couldn't find any work around for some of its functions, like :-

1)Open Winscp client by right clicking the window border.

2)CTRL+SHIFT duplicate the window

3)Highlight to copy and click to paste (i know pressing the middle mouse button in Linux would paste the highlighted text, but thats not possible when i am using a laptop.

4)Also I use NX(URL...) to ssh to the Xwindow... i am wondering if there are any other programs that allow me to do that (except the vnc stuff)

View 2 Replies View Related

General :: Can't Recall System App To Call / Test Remote Access To Another Server On Same Network?

Jul 25, 2011

I have logged into one Linux VM and I want to test remote access to another Linux server on the same network but I cannot recall the Linux application to call?

View 10 Replies View Related

General :: Remote Desktop (linux Rdesktop) To Windows 7 Timing Out?

Apr 8, 2011

I have a remote desktop session to a Windows 7 Workstation that keeps timingut/disconnecting after a minute or two of idiling. Also, sometimes it disconnects while I am in the middle of using it.I have tried turing off all NIC power saving options, the sound option for remote desktop, and all the go to sleep power saving options. I don't have any issues with remote desktop connecting to various Windows Server 2008 R2 Machines and VMs.

View 1 Replies View Related

Red Hat / Fedora :: Putty / Xming / Remote Access

Apr 23, 2010

I am trying to remotely access a linux machine to run Cadence from my laptop.I downloaded Putty and Xming/XLaunch.I run Putty, enable X11 forwarding, then sign into my host address.I am successfully able to access and navigate through my home directory, however once I try and run Cadence, I get the attached error.

View 4 Replies View Related

Software :: Best Chat Program For Linux Desktops In Call Centre?

Dec 2, 2010

A friend of mine is setting up infrastructure for a new call centre and they are using Ubuntu Linux on staff desktops. They need a chat program that will only work on the local network, and they want to allow staff to only access a browser, the chat client and spreadsheet software.

(a) What chat program can they use, and

(b) How can one disactivate most of the programs running on the desktop? Is uninstalling via synaptic/ Ubuntu Software Centre overkill?

View 7 Replies View Related

CentOS 5 :: Use Putty To Ssh From Windows Laptop To A Remote Machine?

Jun 25, 2010

I am using CentOs 5.5.

I use Putty to ssh from my windows laptop to a remote CentOS machine. Is there a way to start a shell that doesnt dies when I disconnect so I can connect again and reclaim it?

View 3 Replies View Related

General :: Windows - Accessing The Desktop Of A Linux Machine (server) Throught Remote Access?

Jun 8, 2011

I was looking for:how to access my Linux machine(OpenSuse 11.3) that is being hosted at my hoster company from my home Win Pc, I found TightVNC , but I am confused, should I install it on both systems ( viewer and server) ? .. what about the VirtualBox , can i Access with that tool or it is only for mounting the local Virtual Machines?

View 2 Replies View Related

General :: Get User Input Into A Script ?

Nov 5, 2009

I have a section of a script that is supposed to change the filename of similar files in a directory. It works the way I need it to work, except that I would like to input the new filename each time it runs without having to edit the script.

I capture 5-6 images into ~/screenshots. They are labeled Picture 1.png, Picture 2.png, etc. I would like to be able to rename them as Lesson 1.png, Lesson 2.png, and so forth. It works if I hardcode the new NAME (Lesson) into the script, but I want to replace NAME with a variable that I can input at a prompt or pass into the script from another. I have tried setting a variable and replacing "Lesson" with $variable in line #11, but that leaves me with only the extension and no filename.

I have also tried using $1 on the command line:

Here is what I have that works:

How do I get a variable into this script?

View 2 Replies View Related

General :: Auto Start Several Terminals On Linux

Apr 23, 2011

Every time I reboot my linux machine I have to set up 5 or 6 terminals and Im trying to find a way to do this automatically. Bind a script to a shortcut or on startup that starts several terminals (extra point if theyre tabbed) and have each terminal ssh to different servers.

View 3 Replies View Related

General :: Cannot Boot Linux At Start Screen

May 7, 2010

i have downloaded linux mint 8 and burnt it to disc ive been trying for what seems like for ever to load it but cant find out how to! im using a laptop with windows xp, and an external hard drive so cannot boot linux at start screen can anyone help me do it please.

View 2 Replies View Related

General :: How To Get Invalid User Input Into Variable?

Apr 8, 2010

I have a script in which it searches the password file for a username based on the user's input. Is there a way I can take the bad input and keep it in a variable. (one that keeps adding all the non-existent users)so how would I get non-existent users into another variable?

View 9 Replies View Related

General :: How To Check Quota Of A User In UNIX / Linux?

Aug 1, 2011

How to check quota of a user in UNIX/Linux?

View 2 Replies View Related

Software :: Remote Procedure Call (RPC) Protocol Uses Only TCP Or Possible To Use RPC Over UDP?

Apr 9, 2011

The Remote Procedure Call (RPC) protocol uses only TCP, or is it possible to use RPC over UDP?

View 1 Replies View Related

General :: User Defined Input In Shell Script

Dec 2, 2010

I want ssh a remote server through shell script with predefines username and passwd. i dont know how to use expect command to do that.

View 4 Replies View Related

General :: Mini Linux Distributive With Multi User Switch

Sep 27, 2010

I`m trying to find minimalistic distributive for vmware player with switch user option. With gdmflexiserver or something like this.Or perhaps there is a way how to do this in puppylinux or DSL.

View 2 Replies View Related

General :: Ssh Without Password From User To Root On Same Linux Enterprise 5 Machine

Jan 22, 2010

My application is installed on root of RH enterprise 5 and is run via user on the same machine. This need ssh without password from the user.

i do the following :
1. run ssh-keygen in .ssh directory of the user.
2. copy the id_rsa.pub as the authorized-keys in the root's .ssh directory
3 chmod 600 to the authorized_keys
4.restart the machine
5. login from the user and ssh SER ( SER is the entry in the /etc/hosts with the ip address of the machine)
6 It still prompt for the password

How can i ssh from the user to the machine without password.

View 3 Replies View Related

General :: Store User Input In A Config File GUI For A BASH Script?

Dec 4, 2010

I'm trying to create a backup script. For my second version, I want to make a GUI that will ask the user three things:

1. which folders should be excluded
2. where to store the backup
3. the user's email

I need to store this input, and later input the values into variables in my script. How do I go about doings this?

View 1 Replies View Related

General :: Bourne Shell Input From File Using - Then Return Control To User?

May 5, 2011

I have a program that I run from the terminal that requires manual input (it's matlab in mex debugging mode, matlab -Dgdb, which starts the GNU C debugger with its own custom settings).

Every time I run this program I always type in the same few commands in the program's interactive shell before I actually start working (for example: run -nojvm; stop at mexFunction; continue). I want to avoid typing these commands and I thought I could do this with shell scripting, saving the commands in the mycommands file, then running: myprogram < mycommands

The problem is that this runs all the commands and then exits the program. I want it to run the commands and return control to me so I can run my commands. Is there a way to tell the shell to use a file or a string as the input to a program then immediately return control to the user without the exiting the program?

View 3 Replies View Related

Networking :: Start Graphical Application In X Environment Using PUTTY?

Nov 3, 2010

i can start applications like Openoffice, firefox and other graphical app inside terminal on gnome.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved