Re: Arriving at a specified directory instead of the user's home
- From: "Kalyan Manchikanti" <kalyan.manchikanti@xxxxxxxxx>
- Date: 22 Mar 2007 07:48:07 -0700
On Mar 21, 2:28 pm, bejo...@xxxxxxxxx wrote:
Can I somehow tell ssh to land in a different directory than the home
of the user? I.e., something like this:
ssh -target-dir=/local/cooldir me@themachine
or if I could get ssh not to logout after performing a command, that
would be good, too, because the command could be a 'cd':
ssh -dontlogout me@themachine "cd /local/cooldir"
(Just to avoid confusion: the options "-target-dir" and "-dontlogout"
don't actually exist... unfortunately :) )
I am using this version: OpenSSH_4.2p1, OpenSSL 0.9.8a 11 Oct 2005
Can anyone help with this, please?
If you have your keys setup something like this can be achieved
ssh <srvrname> "echo 'cd <somedir>' >> .profile(orwhatever .dotfile)";
make sure to remove the added last line in your dotfile if you dont'
want it to be permanent..
- Prev by Date: Re: Source address problem on ssh port forwarding
- Next by Date: Re: Arriving at a specified directory instead of the user's home
- Previous by thread: Arriving at a specified directory instead of the user's home
- Next by thread: Re: Arriving at a specified directory instead of the user's home