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:
Hi!
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
->
me@themachine:/local/cooldir #
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?
Thanks,
Agoston
If you have your keys setup something like this can be achieved
using..
ssh <srvrname> "echo 'cd <somedir>' >> .profile(orwhatever .dotfile)";
ssh <srvrname>
make sure to remove the added last line in your dotfile if you dont'
want it to be permanent..
.
- References:
- 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
- Index(es):
Relevant Pages
|
|