Monday, June 20, 2011

Configure SSH jump hosts

Here is a configuration for establishing an ssh connection to a hidden host via a jump host.
This allows to connect hiddenhost just by typing (also works with scp and sftp)
    > ssh hiddenhost
if public keys for both and are available in the local host,
then the connection will be established without prompting for any password.
Edit: .ssh/config and add the entry:

# connect: username@hiddenhost ( via
Host hiddenhost
   User username
   ProxyCommand ssh  nc %h %p
   ForwardAgent yes

Alternatively with the following line is possible to establish the connection to, 
but the local key will not be presented to

    > ssh -t   ssh  username@


No comments:

Post a Comment