I can do this: ssh hostname "cd projects" but it exits after it changes directory. How can I do that, but leave the ssh shell open so now I am in projects? I also might want to open a mysql shell afterwords.
Tell me more
×
Server Fault is a question and answer site for
professional system and network administrators. It's 100% free, no registration required.
|
you can use other shells instead of bash |
|||
|
|
|
You can create ~/.ssh/rc (on the remote host) with commands you want run each time the user logs in. It will be executed prior to invocation of the shell. See the sshd man page, section SSHRC, for more information (note especially the comments regarding necessity for setup of xauth if this file is deployed.) |
|||
|
|