Can PuTTY or Windows Telnet connect to a mainframe or IBM i?
Why a VT-style Telnet or SSH client cannot show mainframe or IBM i screens properly, what you get if you try, and which client type to use instead.
Not in a useful way. A z/OS mainframe and IBM i expect a block-mode terminal: a 3270 for the mainframe, a 5250 for IBM i. PuTTY, the Windows telnet command and other VT clients are character-mode terminals. They can open a connection to port 23, but they do not speak the 3270 or 5250 data stream, so you will not get the normal full-screen panels.
Block mode versus character mode
A 3270 or 5250 terminal receives a whole screen with defined input fields. You type locally, and nothing goes to the host until you press Enter or a function key. Then the terminal sends only the changed fields.
A VT terminal sends each keystroke to the host the moment you press it, and the host echoes it back. The two models are different enough that the host needs its own support for each.
What happens with a z/OS mainframe
The z/OS Telnet server offers connection modes in this order: TN3270E, then TN3270, then line mode. It does not support plain Telnet (NVT) sessions beyond negotiating one of those. A client that cannot do 3270 therefore gets, at most, a line-mode session where the host is set up for one: text one line at a time, with no ISPF, SDSF or CICS screens.
What happens with IBM i
IBM i is more forgiving. Its Telnet server can run 5250 applications for a VT100 or VT220 client by translating 5250 functions to VT keys. For example, F1 to F12 become Esc followed by a key on the top row of the keyboard, and F13 to F24 add Shift to that key. For the whole default map, see IBM i VT100 key map: F1–F24, Field Exit, Error Reset, SysReq.
IBM itself says this is not the preferred mode. Every keystroke travels to the server and back, function keys need escape sequences, and how the server treats a client it cannot match to a supported type depends on the host's Telnet setting (VT100/VT220 mode or ASCII line mode). The administrator can show the current key map with DSPVTMAP. If a TN5250 client lands in VT mode by mistake, see TN5250 garbage or VT100 screen after connecting to IBM i.
What about SSH?
SSH works with both systems, but it reaches a different place:
- IBM i: SSH starts a shell in PASE, the AIX-compatible environment, not the 5250 Sign On screen or menus. If the login is refused, see IBM i SSH "Permission denied": home, key permissions, PASE shell.
- z/OS: SSH starts a z/OS UNIX shell, not TSO, ISPF or CICS.
That is useful for files and scripts. For green-screen applications you still need a 3270 or 5250 session.
What to use instead
- Mainframe (z/OS, z/VM, z/VSE): a TN3270 client.
- IBM i (AS/400, iSeries): a TN5250 client.
- Linux, Unix and similar: a VT client over SSH, Mosh or Telnet.
Both TN3270 and TN5250 normally use port 23, or 992 with TLS, but the host can use any port. If you only have a host name and port, see 3270, 5250 or VT: which terminal type do I need?.
Related
- 3270, 5250 or VT: which terminal type do I need?
- Using a 3270 emulator on IBM i
- Telnet basics
- How a 3270 terminal works
- How a 5250 terminal works
- VT, xterm and terminal types
- TN5250 garbage or VT100 screen after connecting to IBM i
- IBM i VT100 key map: F1–F24, Field Exit, Error Reset, SysReq
Sources
- Connection mode choices, z/OS 2.5 Communications Server documentation
- Configuring Telnet server for VTxxx full-screen mode, IBM i 7.5 documentation
- Changing the default shell for inbound SSH connections to IBM i, IBM Support
- z/OS OpenSSH User's Guide, z/OS 3.1 (PDF)
- RFC 1576: TN3270 Current Practices
- RFC 1205: 5250 Telnet Interface