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