this is how to multi-hop servers in one command
1 2 3 4 |
ssh -A -t <jump-user>@<jump-server> ssh -A -X <destination-server> # example to go directly to far-away-server via jump.server: ssh -A -t jump-user@jump.server.net ssh -A -X far-user@far-away-server.net |
Using a bash alias
1 2 3 4 5 6 |
a@a:~$ head -1 ~/.bash_aliases alias go='ssh -A -t base@main.app.farm.net ssh -A -X' a@a:~$ go farm3 Last login: Thu Aug 14 14:21:09 CEST 2014 from main.app.farm3.net on pts/22 base@farm3 ~ $ |
References
1. http://superuser.com/questions/688011/ssh-multi-hop-adapting-command-to-ssh-config-file