1plink(1) PuTTY tool suite plink(1)
2
3
4
6 plink - PuTTY link, command line network connection tool
7
9 plink [options] [user@]host [command]
10
12 plink is a network connection tool supporting several protocols.
13
15 The command-line options supported by plink are:
16
17 -V Show version information and exit.
18
19 -pgpfp Display the fingerprints of the PuTTY PGP Master Keys and exit,
20 to aid in verifying new files released by the PuTTY team.
21
22 -v Show verbose messages.
23
24 -load session
25 Load settings from saved session.
26
27 -ssh Force use of SSH protocol (default).
28
29 -telnet
30 Force use of Telnet protocol.
31
32 -rlogin
33 Force use of rlogin protocol.
34
35 -raw Force raw mode.
36
37 -serial
38 Force serial mode.
39
40 -ssh-connection
41 Force use of the `bare ssh-connection' protocol. This is only
42 likely to be useful when connecting to a psusan(1) server, most
43 likely with an absolute path to a Unix-domain socket in place of
44 host.
45
46 -proxycmd command
47 Instead of making a TCP connection, use command as a proxy; net‐
48 work traffic will be redirected to the standard input and output
49 of command. command must be a single word, so is likely to need
50 quoting by the shell.
51
52 The special strings %host and %port in command will be replaced
53 by the hostname and port number you want to connect to; to get a
54 literal % sign, enter %%.
55
56 Backslash escapes are also supported, such as sequences like \n
57 being replaced by a literal newline; to get a literal backslash,
58 enter \\. (Further escaping may be required by the shell.)
59
60 (See the main PuTTY manual for full details of the supported %-
61 and backslash-delimited tokens, although most of them are proba‐
62 bly not very useful in this context.)
63
64 -P port
65 Connect to port port.
66
67 -l user
68 Set remote username to user.
69
70 -m path
71 Read remote command(s) from local file path.
72
73 -batch Disable interactive prompts.
74
75 -sanitise-stderr
76
77
78 -sanitise-stdout
79
80
81 -no-sanitise-stderr
82
83
84 -no-sanitise-stdout
85 By default, Plink can choose to filter control characters if
86 that seems appropriate, to prevent remote processes sending con‐
87 fusing escape sequences. These options override Plink's default
88 behaviour to enable or disabling such filtering on the standard
89 error and standard output channels.
90
91 -pw password
92 Set remote password to password. CAUTION: this will likely make
93 the password visible to other users of the local machine (via
94 commands such as `w').
95
96 -L [srcaddr:]srcport:desthost:destport
97 Set up a local port forwarding: listen on srcport (or sr‐
98 caddr:srcport if specified), and forward any connections over
99 the SSH connection to the destination address desthost:destport.
100 Only works in SSH.
101
102 -R [srcaddr:]srcport:desthost:destport
103 Set up a remote port forwarding: ask the SSH server to listen on
104 srcport (or srcaddr:srcport if specified), and to forward any
105 connections back over the SSH connection where the client will
106 pass them on to the destination address desthost:destport. Only
107 works in SSH.
108
109 -D [srcaddr:]srcport
110 Set up dynamic port forwarding. The client listens on srcport
111 (or srcaddr:srcport if specified), and implements a SOCKS
112 server. So you can point SOCKS-aware applications at this port
113 and they will automatically use the SSH connection to tunnel all
114 their connections. Only works in SSH.
115
116 -X Enable X11 forwarding.
117
118 -x Disable X11 forwarding (default).
119
120 -A Enable agent forwarding.
121
122 -a Disable agent forwarding (default).
123
124 -t Enable pty allocation (default if a command is NOT specified).
125
126 -T Disable pty allocation (default if a command is specified).
127
128 -1 Force use of SSH protocol version 1.
129
130 -2 Force use of SSH protocol version 2.
131
132 -4, -6 Force use of IPv4 or IPv6 for network connections.
133
134 -C Enable SSH compression.
135
136 -i keyfile
137 Private key file for user authentication. For SSH-2 keys, this
138 key file must be in PuTTY's PPK format, not OpenSSH's format or
139 anyone else's.
140
141 If you are using an authentication agent, you can also specify a
142 public key here (in RFC 4716 or OpenSSH format), to identify
143 which of the agent's keys to use.
144
145 -noagent
146 Don't try to use an authentication agent for local authentica‐
147 tion. (This doesn't affect agent forwarding.)
148
149 -agent Allow use of an authentication agent. (This option is only nec‐
150 essary to override a setting in a saved session.)
151
152 -no-trivial-auth
153 Disconnect from any SSH server which accepts authentication
154 without ever having asked for any kind of password or signature
155 or token. (You might want to enable this for a server you always
156 expect to challenge you, for instance to ensure you don't acci‐
157 dentally type your key file's passphrase into a compromised
158 server spoofing Plink's passphrase prompt.)
159
160 -noshare
161 Don't test and try to share an existing connection, always make
162 a new connection.
163
164 -share Test and try to share an existing connection.
165
166 -hostkey key
167 Specify an acceptable host public key. This option may be speci‐
168 fied multiple times; each key can be either a fingerprint
169 (SHA256:AbCdE..., 99:aa:bb:..., etc) or a base64-encoded blob in
170 OpenSSH's one-line format.
171
172 Specifying this option overrides automated host key management;
173 only the key(s) specified on the command-line will be accepted
174 (unless a saved session also overrides host keys, in which case
175 those will be added to), and the host key cache will not be
176 written.
177
178 -s Remote command is SSH subsystem (SSH-2 only).
179
180 -N Don't start a remote command or shell at all (SSH-2 only).
181
182 -nc host:port
183 Make a remote network connection from the server instead of
184 starting a shell or command.
185
186 -sercfg configuration-string
187 Specify the configuration parameters for the serial port, in
188 -serial mode. configuration-string should be a comma-separated
189 list of configuration parameters as follows:
190
191 • Any single digit from 5 to 9 sets the number of data
192 bits.
193
194 • `1', `1.5' or `2' sets the number of stop bits.
195
196 • Any other numeric string is interpreted as a baud rate.
197
198 • A single lower-case letter specifies the parity: `n' for
199 none, `o' for odd, `e' for even, `m' for mark and `s' for
200 space.
201
202 • A single upper-case letter specifies the flow control:
203 `N' for none, `X' for XON/XOFF, `R' for RTS/CTS and `D'
204 for DSR/DTR.
205
206 -sshlog logfile
207
208
209 -sshrawlog logfile
210 For SSH connections, these options make plink log protocol de‐
211 tails to a file. (Some of these may be sensitive, although by
212 default an effort is made to suppress obvious passwords.)
213
214 -sshlog logs decoded SSH packets and other events (those that -v
215 would print). -sshrawlog additionally logs the raw encrypted
216 packet data.
217
218 -logoverwrite
219 If Plink is configured to write to a log file that already ex‐
220 ists, discard the existing file.
221
222 -logappend
223 If Plink is configured to write to a log file that already ex‐
224 ists, append new log data to the existing file.
225
226 -shareexists
227 Instead of making a new connection, test for the presence of an
228 existing connection that can be shared. The desired session can
229 be specified in any of the usual ways.
230
231 Returns immediately with a zero exit status if a suitable `up‐
232 stream' exists, nonzero otherwise.
233
235 For more information on plink, it's probably best to go and look at the
236 manual on the PuTTY web page:
237
238 https://www.chiark.greenend.org.uk/~sgtatham/putty/
239
241 This man page isn't terribly complete. See the above web link for bet‐
242 ter documentation.
243
244
245
246PuTTY tool suite 2004‐03‐24 plink(1)