[opensuse] Fwd: [opensuse-factory] ssh command problem
Sorry folks. I sould have said that the client is a 12.2 RC2 box and the remote ssh box is 12.1. There is a rsa key at each end of the connection so it ssh's without password. Maybe I sent it to the wrong list. thanks, L x -------- Original Message -------- Subject: [opensuse-factory] ssh command problem Date: Fri, 17 Aug 2012 17:47:36 +0200 From: lynn <lynn@steve-ss.com> To: opensuse-factory <opensuse-factory@opensuse.org> Hi I have a script which has a ssh call in it: echo Calling the file server ssh root@hh32 "mkdir /home2/$2/$1 ; chown $uid:20513 /home2/$2/$1 ; exit" echo Back on DC <rest of script> The ssh call works, but it never returns to the calling script to finish the rest of the commands.. IOW we never see the words: Back on DC It must have exited because the command prompt after the ssh call is that of the calling box, not the remote box. How do I exit correctly at end of the ssh call so that the rest of the calling script is executed? Thanks, L x -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Friday 17 Aug 2012 17:52:52 lynn wrote:
-------- Original Message -------- Subject: [opensuse-factory] ssh command problem Date: Fri, 17 Aug 2012 17:47:36 +0200 From: lynn <lynn@steve-ss.com> To: opensuse-factory <opensuse-factory@opensuse.org>
Hi
I have a script which has a ssh call in it:
echo Calling the file server ssh root@hh32 "mkdir /home2/$2/$1 ; chown $uid:20513 /home2/$2/$1 ; exit" echo Back on DC <rest of script>
The ssh call works, but it never returns to the calling script to finish the rest of the commands.. IOW we never see the words: Back on DC It must have exited because the command prompt after the ssh call is that of the calling box, not the remote box.
How do I exit correctly at end of the ssh call so that the rest of the calling script is executed?
Hi Lynn try using batch mode for ssh (ssh -o "BatchMode yes" ...) I dont think you need the exit if you dont want any warnings use -q option as well. you can also try -v -v -v to get as much debugging as you can to see what is happening your mkdir probably should be mkdir -p -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Andrew Colvin
-
lynn