Re: chaining ssh commands
From: Unruh (unruh-spam_at_physics.ubc.ca)
Date: 09/26/05
- Next message: KS: "Re: AIX's LDAP with PAM and Expired password"
- Previous message: sukhmeet_at_gmail.com: "How to run a command after logging using a SFTP client.."
- In reply to: tom: "chaining ssh commands"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 26 Sep 2005 15:26:03 GMT
"tom" <weiyetang@yahoo.com> writes:
>Hi,
>I need to cd to /usr/me directory on the remote machine and extract
>me.tar in that directory. I'm wondering how we can chain ssh commands
>like this:
>ssh me@remotebox cd /usr/me;ssh me@remotebox tar -xvf me.tar
ssh me@remotebox 'cd /usr/me; tar -xvf me.tar'
>Unfortunately, ssh will relogin into /home/me directory to extract the
>tar instead of using /usr/me directory. Does someone have an idea of
>how to do that properly?
- Next message: KS: "Re: AIX's LDAP with PAM and Expired password"
- Previous message: sukhmeet_at_gmail.com: "How to run a command after logging using a SFTP client.."
- In reply to: tom: "chaining ssh commands"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]