Re: login into a particular directory using ssh
On Sun, 05 Dec 2004 17:18:54 -0500, David Mandelberg
<mandelbergd@eth0.is-a-geek.org> wrote:
> ssh user@hostname "sh -c 'cd dirname; exec somecommand'"
>
> somecommand is the command you want to run after cd'ing. E.g. if you
> want to run bash in / as joe at shell.example.net:
>
> ssh joe@shell.example.net "sh -c 'cd /; exec bash'"
>
I tried this. It is not working. The machine seems to be hanging. Is
there any typo there?
raju
--
Kamaraju S Kusumanchi
Cornell University
http://people.cornell.edu/pages/kk288/
http://groups.yahoo.com/group/flumech/
Reply to: