I have a large number of Linux machines all of which mount my home directory over NFS. If I'm in ~/foo/bar/baz I'd like to be able to ssh to another machine and automatically start using that as my working directory. There doesn't appear to be an easy way to do this; I can think of some hacky ones but would like to check before trying them.
feedback
|
|
Check out SendEnv (in So you could do something like:
:
| |||
feedback
|
|
I don't know if this is considered "Hacky" or not, but here's an idea: Since your homedir is shared across all servers, the same profile will be executed at login. You could have your .profile do something like this at the bottom:
Then, alias your SSH command to run a script that will put your current dir into your I have not tested this, but it could be a starting point. Good luck! | |||
|
feedback
|
|
How about this bash function (assuming that bash really is your shell):
You could then do | |||||||||
feedback
|
|
You can use the following:
| ||||
|
feedback
|