ssh using system call

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi all,

I am new to perl programming on unix, I am trying to ssh to another
box, here is the code I have written,

system ("ssh mygoodbox; mv x y; exit;) ;

it does ssh sucessfully and mv command also works fine. But controle
doesnt return even though exit is there. It just stays in that
machine. Can some body explain how to handle
this. I am using perl 5.8

Please help

Re: ssh using system call

At 2008-02-07 09:12AM, "seema" wrote:
Quoted text here. Click to load it

Missing quote.  
Quoted text here. Click to load it

If you expect the mv and exit to happen on 'mygoodbox', you're mistaken.
I assume you want the mv command to execute on the remote machine.  
See ssh(1) man page:

   system qw(ssh mygoodbox mv x y);

Glenn Jackman
"You can only be young once. But you can always be immature." -- Dave Barry

Site Timeline