tags:

views:

114

answers:

1

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 routed to /something/other/

Is this possible?

*The client runs Debian 5.04

+2  A: 

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.

cdated