SSH via an intermediary host
Let's say your shop is set up so you have to ssh to a machine (let's call it intermediary.example.com) and from there ssh to where you really want to go. (Don't ask me why, all I know is I run into this.)
If netcat (nc
) is installed on the intermediary machine, you can use this in your ~/.ssh/config
to make it so when you type ssh target
, you go through the intermediary machine automatically. (There are other ways to do it without nc
and I honestly can't remember why I stopped doing it that way and started doing it this way, but there was a reason. Educated guesses as to what the reason was are welcome. ANYWAY...)
Host target
ProxyCommand ssh -q intermediary.example.com nc target.example.com 22
Written by Rich Trott
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ssh
Authors
Related Tags
#ssh
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#