What would I have to add to a SSH hosts entry in my config file so that everytime I ssh into that host, I get sent to specific initial path?
Host foobar
HostName foobar.com
User foobar
|
What would I have to add to a SSH hosts entry in my config file so that everytime I ssh into that host, I get sent to specific initial path?
| |||
|
feedback
|
|
While the existing answers are fine, not one person specifically mentioned that setting the home directory is done in the password file. You can change the home directory by editing the
Utilities and methods differ between UNIXes, I'm assuming Linux. Modifying | |||||||
feedback
|
|
That is not up to SSH. You will typically have your CWD set to HOME on login. May I suggest reading the man-page of your shell and putting a cd command in the initial login file? | |||
|
feedback
|
|
I don't believe this is possible, but what you can do is add
to the end of your .bashrc file (assuming you are running bash) | |||
|
feedback
|