Monday, July 2, 2012

Configuring PuTTY: Transparent Multi-hop SSH

Many environments require that you login into a gateway server before being able to login into the remote server you actually want to get to.  In these cases you can configure PuTTY to proxy through the gateway server so that it looks as though you're going directly to the remote server.

The following examples assumes OpenSSH on the remote server and gateway and Windows7 on the Desktop.

  • Login into the gateway server and add your to to the authorized keys file 
    • ssh-add -L >> ~/.ssh/authorized_keys
  • Configure PuTTY Proxy Tab
    • Proxy type: Local
    • Proxy hostname: (gateway server here)
    • Exclude Hosts/IPs: (gateway server here)
    • Username: (gateway username here)
    • Local Proxy Command:  plink.exe %user@%proxyhost -nc %host:%port \n



  • Login into the remote server and add your key to the authorized keys file
    • ssh-add -L >> ~/.ssh/authorized_keys


§