The normal answer to most ssh related problems is: “use public/private keys”
but sometimes this does not work…
What i did regularly was this:
- ssh to xxx@asdads.com
- enter password
- sudo su admin
- cd /apps/hosts/some_project
Thats not very complicated, but its frustrating. What I do now is: “sshxx”, which executes this excpect script in ~/bin/sshxx
(For Ubuntu you need to “sudo apt get install expect” first)