|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
hi All, cat login.list Code:
server1 userid1 server2 userid2 server3 userid3 ---------------------------------------- Code:
#SSHSCRIPT.ksh
FILE=login.list
while read vah vah_id
do
ssh $vah -l $vah_id "pwd"
done < "$FILE"----------------------------------------- When i execute ksh -x SSHSCRIPT.ksh it executes only one loop and exist, Please assist me here OUTPUT: Code:
ksh -x SSHSCRIPT.ksh + FILE=login.list + read vah vah_id + IFS= + ssh server1 -l userid1 pwd /server1/admin + read vah vah_id + IFS= Last edited by Franklin52; 01-17-2013 at 04:27 AM.. Reason: Please use code tags for data and code samples |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
This is a fairly common question.
The fairly common answer is to use the -n option of SSH. |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
it worked with -n option.
thank you very much. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| while loop stops after first iteration - remote ssh exit command problem? | jelloir | Shell Programming and Scripting | 3 | 02-10-2012 12:50 AM |
| Running for loop on remote server | sexyTrojan | Shell Programming and Scripting | 6 | 03-14-2010 03:13 AM |
| SSH Remote Server issue | la_womn | Shell Programming and Scripting | 1 | 05-20-2008 03:17 PM |
| automatic ssh into remote server using ksh | tekline | Shell Programming and Scripting | 4 | 07-23-2007 01:35 PM |
|
|