Re: chaining ssh commands
From: Jacques-Olivier Haenni (jo_no_spam_at_haenni.info)
Date: 09/26/05
- Previous message: tom: "chaining ssh commands"
- In reply to: tom: "chaining ssh commands"
- Next in thread: Darren Tucker: "Re: chaining ssh commands"
- Reply: Darren Tucker: "Re: chaining ssh commands"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 26 Sep 2005 09:13:43 +0200 To: tom <weiyetang@yahoo.com>
Hello,
This can simply be performed as follows:
ssh me@remotebox 'cd /usr/me; tar -xvf me.tar'
Cheers,
Jacques-Olivier
tom wrote:
>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
>
>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?
>
>Thanks in advance.
>
>Tom
>
>
>
- Previous message: tom: "chaining ssh commands"
- In reply to: tom: "chaining ssh commands"
- Next in thread: Darren Tucker: "Re: chaining ssh commands"
- Reply: Darren Tucker: "Re: chaining ssh commands"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]