When I ssh into my freebsd I want to be automatically in another directory, and not my home directory.
I.e. instead of /users/home/john I want to be in /users/home/john/what/i/am/working/on
|
When I ssh into my freebsd I want to be automatically in another directory, and not my home directory. I.e. instead of
| ||||
|
feedback
|
|
So the simplest case of this is pretty easy. In your ~jdoe/.profile you can add:
If you're looking for the system to remember which directory you're in, per-terminal, and go back to the right one when you log back in on that terminal, that's more complex but still do-able with shell. Since $SSH_TTY is a filename, you can prepend "~/.mydirs/" to it, and use that filename to hold a copy of the CWD for the session of that terminal. It's more complex than that, but this is the general idea. Hope this helps! | |||
|
feedback
|
|
ssh john@someplace:/path/to/wherever notice the colon ^ | |||
feedback
|