1plink(1)                       PuTTY tool suite                       plink(1)
2
3
4

NAME

6       plink - PuTTY link, command line network connection tool
7

SYNOPSIS

9       plink [options] [user@]host [command]
10

DESCRIPTION

12       plink is a network connection tool supporting several protocols.
13

OPTIONS

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       -noshare
153              Don't  test and try to share an existing connection, always make
154              a new connection.
155
156       -share Test and try to share an existing connection.
157
158       -hostkey key
159              Specify an acceptable host public key. This option may be speci‐
160              fied  multiple  times;  each  key  can  be  either a fingerprint
161              (SHA256:AbCdE..., 99:aa:bb:..., etc) or a base64-encoded blob in
162              OpenSSH's one-line format.
163
164              Specifying  this option overrides automated host key management;
165              only the key(s) specified on the command-line will  be  accepted
166              (unless  a saved session also overrides host keys, in which case
167              those will be added to), and the host  key  cache  will  not  be
168              written.
169
170       -s     Remote command is SSH subsystem (SSH-2 only).
171
172       -N     Don't start a remote command or shell at all (SSH-2 only).
173
174       -nc host:port
175              Make  a  remote  network  connection  from the server instead of
176              starting a shell or command.
177
178       -sercfg configuration-string
179              Specify the configuration parameters for  the  serial  port,  in
180              -serial  mode.  configuration-string should be a comma-separated
181              list of configuration parameters as follows:
182
183              Any single digit from 5 to 9  sets  the  number  of  data
184                     bits.
185
186              `1', `1.5' or `2' sets the number of stop bits.
187
188              Any other numeric string is interpreted as a baud rate.
189
190              A  single lower-case letter specifies the parity: `n' for
191                     none, `o' for odd, `e' for even, `m' for mark and `s' for
192                     space.
193
194              A  single  upper-case  letter specifies the flow control:
195                     `N' for none, `X' for XON/XOFF, `R' for RTS/CTS  and  `D'
196                     for DSR/DTR.
197
198       -sshlog logfile
199
200
201       -sshrawlog logfile
202              For  SSH  connections, these options make plink log protocol de‐
203              tails to a file. (Some of these may be  sensitive,  although  by
204              default an effort is made to suppress obvious passwords.)
205
206              -sshlog logs decoded SSH packets and other events (those that -v
207              would print). -sshrawlog additionally  logs  the  raw  encrypted
208              packet data.
209
210       -logoverwrite
211              If  Plink  is configured to write to a log file that already ex‐
212              ists, discard the existing file.
213
214       -logappend
215              If Plink is configured to write to a log file that  already  ex‐
216              ists, append new log data to the existing file.
217
218       -shareexists
219              Instead  of making a new connection, test for the presence of an
220              existing connection that can be shared. The desired session  can
221              be specified in any of the usual ways.
222
223              Returns  immediately  with a zero exit status if a suitable `up‐
224              stream' exists, nonzero otherwise.
225

MORE INFORMATION

227       For more information on plink, it's probably best to go and look at the
228       manual on the PuTTY web page:
229
230       https://www.chiark.greenend.org.uk/~sgtatham/putty/
231

BUGS

233       This  man page isn't terribly complete. See the above web link for bet‐
234       ter documentation.
235
236
237
238PuTTY tool suite                  2004‐03‐24                          plink(1)
Impressum