[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: login into a particular directory using ssh



> If your home directory has a different path on the two machines, try this:
> 
>   DYNAMIC=${PWD#$HOME/}
>   ssh -t joe@shell.example.net "cd $DYNAMIC ; exec /bin/bash --login -i"
> 
> This should plunk you in the corresponding directory on the remote host,
> whether you're in $HOME/foo or /usr/bin.  You don't need to export DYNAMIC.
> 
> 
> Sam
> 

thank you very much. That was exactly what I am after. You really are
a mind reader, arent you :-)

bye
raju

-- 
Kamaraju S Kusumanchi
Cornell University
http://people.cornell.edu/pages/kk288/
http://groups.yahoo.com/group/flumech/



Reply to: