You won't be able to directly connect to an SSH server if it's in a private network or if it's behind a NAT or firewall. A host could also be configured to only allow connection from a specific host or network and deny connection from everywhere else. For this you would have to first either connect to the specific host or network via a VPN, or to connect via a proxy.

PuTTY could be configured to tunnel its connection via a proxy. The supported proxy types for PuTTY are HTTP, SOCKS(4/5), Telnet and Local.

Steps to connect to SSH server using PuTTY via proxy:

  1. Launch PuTTY.
  2. Go to ConnectionProxy from the Category menu in the sidebar.
  3. Choose the type of proxy that you are to use.
  4. Enter the IP address or hostname of the server along with the port that the proxy service is listening to.
  5. Set if whether or not you want the DNS resolution to be done on the proxy server or locally.
  6. Enter proxy credentials if required.
  7. Go to session from the Category menu.
  8. Enter connection details such as the hostname or the IP address of the server that you want to connect to, local to the proxy server.
  9. Click on the Open button to start the connection.
Share this guide!
Discuss the article:

Comment anonymously. Login not required.