Putty SSH Multi-hop X11 Forwarding

Wall of Fire Card

If your remote computer is sitting behind a firewall, and you need to go through a sshgateway server, you can use a simple multi-hop instead of a tunnel. e.g.
Home_Computer-> SSH_Gateway -> Work_Computer


With plink on the command line:

plink -t -X -A username@SSH_Gateway ssh -X -A username@work_computer 

Or in Putty:

Hostname: SSH_Gateway
Data -> Auto-login username: username (for ssh gateway)
SSH -> Remote Command:

 ssh -x -A username@work_computer

Auth -> Check “Allow agent forwarding” if you are using Pageant
X11 -> Check “Enable X11 forwarding” if you want it.

What the options mean:
-t enable pty allocation (used so you can do the second ssh from gateway to the work computer)
-A agent forwarding (only needed if you are using Pageant or another key agent)
-X enable X11 forwarding (only needed if you want to send X11 back to your home computer)

If you want X11 on Windows, setup Xming and Bob’s your Uncle.

This entry was posted in Tech. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>