LinuxCommandLibrary

putty

Connect to remote servers via SSH

SYNOPSIS

putty [options] [user@]host
putty -ssh [options] [user@]host
putty -telnet [options] [user@]host
putty -rlogin [options] [user@]host
putty -raw [options] [user@]host
putty -serial [options] COMn
putty -load session_name

PARAMETERS

-load
    Loads a previously saved PuTTY session configuration.

-ssh | -telnet | -rlogin | -raw | -serial
    Specifies the network protocol to use for the connection.

-l
    Specifies the username for the remote login.

-P
    Specifies the port number to connect to.

-pw
    Specifies the password for authentication. Use with extreme caution; highly insecure.

-i
    Specifies the private key file (.ppk format) for SSH public-key authentication.

-loghost
    Records the host name in the session log file.

-logfilename
    Specifies the file path to log the session output.

-L <[listen-IP:]listen-port:host:port>
    Configures local port forwarding (e.g., -L 8080:localhost:80).

-R <[listen-IP:]listen-port:host:port>
    Configures remote port forwarding.

-X or -x
    Enables X11 forwarding for graphical applications.

-N
    Prevents starting a remote shell or command; useful for port forwarding only.

-t
    Forces allocation of a pseudo-terminal.

-T
    Disables pseudo-terminal allocation.

-v
    Displays PuTTY's version information and exits.

DESCRIPTION

PuTTY is a widely-used, free and open-source terminal emulator, serial console, and network file transfer application. Primarily developed for Microsoft Windows, it supports various network protocols including SSH (Secure Shell), Telnet, Rlogin, and raw socket connections. It serves as a crucial tool for securely connecting to remote servers, executing commands, and transferring files over an encrypted channel.

Its robust SSH capabilities include support for multiple authentication methods (password, public key), port forwarding (local, remote, dynamic), and X11 forwarding, making it indispensable for system administrators, developers, and anyone managing remote Unix-like systems. PuTTY also offers a highly configurable interface for session management, allowing users to save connection details, terminal appearance, and various protocol-specific settings for quick access.

CAVEATS

PuTTY is primarily a graphical application for Windows; command-line usage is mainly for automating session launches or specific configurations.

Passing sensitive information like passwords via the command line using -pw is highly insecure as it exposes credentials in system process lists and history.

PuTTY uses its own private key format (.ppk); OpenSSH private keys require conversion using the accompanying PuTTYgen tool before use.

KEY GENERATION (PUTTYGEN)

The PuTTY suite includes PuTTYgen.exe, a utility for generating SSH public and private key pairs. It also supports converting private keys between PuTTY's native .ppk format and OpenSSH formats, which is essential for cross-platform compatibility when using public-key authentication.

COMPANION COMMAND-LINE TOOLS

In addition to the main PuTTY client, the package provides other command-line utilities: PSCP.exe (PuTTY Secure Copy client) for secure file transfers, and PSFTP.exe (PuTTY SFTP client) for interactive SFTP sessions, offering functionality similar to the scp and sftp commands on Linux.

HISTORY

PuTTY was first developed by Simon Tatham and released around 1999. It quickly gained popularity among Windows users due to the lack of a built-in SSH client in older versions of Microsoft Windows. Its development has been continuous, with ongoing updates improving security, adding new features, and enhancing compatibility across various server environments. It has established itself as a standard tool for remote access on the Windows platform.

SEE ALSO

ssh(1), scp(1), sftp(1), telnet(1), rlogin(1), ssh-keygen(1)

Copied to clipboard