SSH into Specified Directory by Default?
By default, when SSH'ing into a client I am automatically placed into /home/marco/ but instead I would like to be placed into /something/other. I would prefer to keep my home directory where it is, but I would like to be automatically route开发者_JAVA技巧d to /something/other/
Is this possible?
*The client runs Debian 5.04
You can pass the command in the ssh to change the directory at the same time you login:
ssh -t localhost "cd /tmp ; bash"
You might get what you want after an alias:
alias ssh-tmp='ssh -t localhost "cd /tmp ; bash"'
So command 'ssh-tmp' will put you directly in the tmp directory.
精彩评论