IBM Support

SSH Tunneling With PuTTY

Troubleshooting


Problem

This document provides information about how to configure a PuTTY session for tunneling Telnet traffic.

Resolving The Problem

To configure a PuTTY session for tunneling Telnet traffic, do the following:

1

Open PuTTY.EXE, configure your host name, and select SSH for port.
2Type the name you wish to use for the saved connection. In this example it is my.test.server. Do not save this yet; we have to configure the ports for tunneling.
3Click on the path to reach Tunnels (Connection > SSH >Tunnels):

This is a screen shot of the session configuration window in Putty.
4In the Port forwarding section, the Source Port is the source TCP/IP address you want assigned to your local host connection. The Destination is the connection on your remote SSH machine. localhost:23 will get you a Telnet connection. Select both Local ports accept connections from other hosts and Remote ports do the same.

This is a screen shot of the tunnelling configuration window in Putty.
5Click the Add button to place your tunnel configuration in the Forwarded ports window.

This is a screen shot of the ports that will be used for Port Forwarding.
6In the left pane, click on Session to bring up the following window. Click on the Save button:

This is a screen shot displaying the save Port Forwarding configuration.
7Now you can launch your session and sign in to the secure shell. After you are signed in, you must leave this window open to keep your tunnel active.

A valid user-ID and password is required to start the ssh tunnel.
8Open IBM Personal Communications. Configure a new connection and use the parameters below:

Once the ssh tunnel is established, the Telnet traffic can be routed through the tunnel.
9Click on Communications, and connect. You should get the remote sign on screen of the system you are tunneling to.

A Signon screen to the OS/400 is presented after the Telnet request is routed through the ssh tunnel.

You can tunnel multiple ports if you like; however, all require that the PuTTY secure shell connection stays active for data to pass over the tunnel to the remote server.

The steps above are represented as the following command on a UNIX system:

ssh -L50000:localhost:23 my.test.server.com

The steps above are represented as the following command on the QP2TERM/QP2SHELL/QSH command line:

ssh -T -L50000:localhost:23 my.test.server.com

[{"Product":{"code":"SWG60","label":"IBM i"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Communications-TCP","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Historical Number

406483368

Document Information

Modified date:
18 December 2019

UID

nas8N1015113