Hello,
I am trying to run an SSH command that will login and then cd to a certain directory and keep the terminal window open. So far, I have tried several variations of:
ssh -t root@<ip> "cd /foo/dir; bash --login"
Unfortunately, it always will go back to the home ~ directory. Running
ssh -t root@<ip> "cd /foo/dir; pwd"
successfully prints the target directory so I know that the first part works, but the bash part must be where there's an issue.
Does anyone have any insight into how I can get this working?