plink(1)
π¦ plink(1) β PuTTY link, command line network connection tool π¦
okay bestie, this is the manual page for plink, the command-line network connection tool from the PuTTY tool suite. Buckle up, because there are a lot of flags and every single one is getting its moment π β¨
πΈ NAME πΈ
plink β PuTTY link, command line network connection tool.
π SYNOPSIS π
plink [options] [user@]host [command]
π DESCRIPTION π
plink is a network connection tool that supports several protocols. That's the whole elevator pitch, and honestly? It's giving main character energy already. π«Ά
β¨ OPTIONS β¨
These are the command-line options that plink supports, bestie:
-Vβ Show version information and exit.-pgpfpβ Display the fingerprints of the PuTTY PGP Master Keys and exit, so you can verify new files released by the PuTTY team.-vβ Show verbose messages.-loadsession β Load settings from a saved session.-sshβ Force use of the SSH protocol. This is the default.-telnetβ Force use of the Telnet protocol.-rloginβ Force use of the rlogin protocol.-rawβ Force raw mode.-serialβ Force serial mode.-ssh-connectionβ Force use of thebare ssh-connectionprotocol. This is only likely to be useful when connecting to apsusan(1)server, most likely with an absolute path to a Unix-domain socket in place of host.-proxycmdcommand β Instead of making a TCP connection, use command as a proxy; network traffic gets redirected to the standard input and output of command. command must be a single word, so it's likely to need quoting by the shell.
The special strings %host and %port inside command get replaced by the hostname and port number you want to connect to; to get a literal % sign, enter %%.
Backslash escapes are supported too, like sequences such as \n being replaced by a literal newline; to get a literal backslash, enter \\.. (The shell may require further escaping.)
(See the main PuTTY manual for full details of the supported %- and backslash-delimited tokens, although most of them are probably not very useful in this context.)
-preconnectcommandcommand β Specify an external command to run just before making the main network connection. The syntax of command is similar to that for-proxycmd.-Pport β Connect to port.-luser β Set the remote username to user.-mpath β Read remote command(s) from the local file path.-batchβ Disable interactive prompts.-sanitise-stderrβ Turn on Plink's control-character filtering for standard error.-sanitise-stdoutβ Turn on Plink's control-character filtering for standard output.-no-sanitise-stderrβ Turn off Plink's control-character filtering for standard error.-no-sanitise-stdoutβ Turn off Plink's control-character filtering for standard output.
By default, Plink can choose to filter control characters if that seems appropriate, to prevent remote processes from sending confusing escape sequences. These options override Plink's default behaviour to enable or disable that filtering on the standard error and standard output channels.
-pwfilefilename β Open filename and use the first line of text read from it as the remote password.-pwpassword β Set the remote password to password.
β οΈ CAUTION: this will likely make the password visible to other users of the local machine (via commands such aspsorw). Use-pwfileinstead, bestie. Seriously. π
-L[srcaddr:]srcport:desthost:destport β Set up local port forwarding: listen on srcport (or srcaddr:srcport if specified), and forward any connections over the SSH connection to the destination address desthost:destport. Only works in SSH.-R[srcaddr:]srcport:desthost:destport β Set up remote port forwarding: ask the SSH server to listen on srcport (or srcaddr:srcport if specified), and forward any connections back over the SSH connection where the client will pass them on to the destination address desthost:destport. Only works in SSH.-D[srcaddr:]srcport β Set up dynamic port forwarding. The client listens on srcport (or srcaddr:srcport if specified), and implements a SOCKS server. So you can point SOCKS-aware applications at this port and they will automatically use the SSH connection to tunnel all their connections. Only works in SSH.-Xβ Enable X11 forwarding.-xβ Disable X11 forwarding. This is the default.-Aβ Enable agent forwarding.-aβ Disable agent forwarding. This is the default.-tβ Enable pty allocation. This is the default if a command is NOT specified.-Tβ Disable pty allocation. This is the default if a command is specified.-1β Force use of SSH protocol version 1.-2β Force use of SSH protocol version 2.-4,-6β Force use of IPv4 or IPv6 for network connections.-Cβ Enable SSH compression.-ikeyfile β Private key file for user authentication. For SSH-2 keys, this key file must be in PuTTY's PPK format, not OpenSSH's format or anyone else's.
If you're using an authentication agent, you can also specify a public key here (in RFC 4716 or OpenSSH format), to identify which of the agent's keys to use.
-noagentβ Don't try to use an authentication agent for local authentication. This doesn't affect agent forwarding.-agentβ Allow use of an authentication agent. This option is only necessary to override a setting in a saved session.-no-trivial-authβ Disconnect from any SSH server which accepts authentication without ever having asked for any kind of password or signature or token. You might want to enable this for a server you always expect to challenge you, for instance to ensure you don't accidentally type your key file's passphrase into a compromised server spoofing Plink's passphrase prompt.-noshareβ Don't test and try to share an existing connection; always make a new connection.-shareβ Test and try to share an existing connection.-hostkeykey β Specify an acceptable host public key. This option may be specified multiple times; each key can be either a fingerprint (SHA256:AbCdE...,99:aa:bb:..., etc) or a base64-encoded blob in OpenSSH's one-line format.
Specifying this option overrides automated host key management; only the key(s) specified on the command line will be accepted (unless a saved session also overrides host keys, in which case those will be added to), and the host key cache will not be written.
-sβ Remote command is an SSH subsystem. SSH-2 only.-Nβ Don't start a remote command or shell at all. SSH-2 only.-nchost:port β Make a remote network connection from the server instead of starting a shell or command.-sercfgconfiguration-string β Specify the configuration parameters for the serial port, in-serialmode. configuration-string should be a comma-separated list of configuration parameters like this:- Any single digit from
5to9sets the number of data bits. 1,1.5or2sets the number of stop bits.- Any other numeric string is interpreted as a baud rate.
- A single lower-case letter specifies the parity:
nfor none,ofor odd,efor even,mfor mark andsfor space. - A single upper-case letter specifies the flow control:
Nfor none,Xfor XON/XOFF,Rfor RTS/CTS andDfor DSR/DTR.
- Any single digit from
-sshloglogfile β For SSH connections, make plink log protocol details to a file.-sshrawloglogfile β For SSH connections, make plink log protocol details to a file. This one additionally logs raw encrypted packet data.
Some of these logs may be sensitive, although by default an effort is made to suppress obvious passwords.
-sshlog logs decoded SSH packets and other events (those that -v would print). -sshrawlog additionally logs the raw encrypted packet data.
-logoverwriteβ If Plink is configured to write to a log file that already exists, discard the existing file.-logappendβ If Plink is configured to write to a log file that already exists, append new log data to the existing file.-shareexistsβ Instead of making a new connection, test for the presence of an existing connection that can be shared. The desired session can be specified in any of the usual ways.
Returns immediately with a zero exit status if a suitable upstream exists, nonzero otherwise.
π MORE INFORMATION π
For more information on plink, it's probably best to go and look at the manual on the PuTTY web page:
https://www.chiark.greenend.org.uk/~sgtatham/putty/
π BUGS π
This man page isn't terribly complete. See the above web link for better documentation. ngl, the web link is the upgrade path π
π That's the page, bestie. Source/version: PuTTY tool suite; date: 2004β03β24. Now go make some connections and slay π
β¨
π¦ where this page comes from
- alpine 3.24: putty-doc 0.84-r1 Β· MIT
- nixos 26.05: putty 0.84
- nixpkgs unstable: putty 0.85
- opensuse-leap 16.0: putty 0.85-bp160.1.1 Β· MIT
- opensuse-leap 16.0: putty 0.85-bp160.1.1 Β· MIT
- opensuse-leap 16.0: putty 0.85-bp160.1.1 Β· MIT
- opensuse-leap 16.0: putty 0.85-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms