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       -pwfile filename
92              Open the specified file, and use the first  line  of  text  read
93              from it as the remote password.
94
95       -pw password
96              Set  remote password to password. CAUTION: this will likely make
97              the password visible to other users of the  local  machine  (via
98              commands such as `ps' or `w'). Use -pwfile instead.
99
100       -L [srcaddr:]srcport:desthost:destport
101              Set  up  a  local  port  forwarding:  listen  on srcport (or sr‐
102              caddr:srcport if specified), and forward  any  connections  over
103              the SSH connection to the destination address desthost:destport.
104              Only works in SSH.
105
106       -R [srcaddr:]srcport:desthost:destport
107              Set up a remote port forwarding: ask the SSH server to listen on
108              srcport  (or  srcaddr:srcport  if specified), and to forward any
109              connections back over the SSH connection where the  client  will
110              pass  them on to the destination address desthost:destport. Only
111              works in SSH.
112
113       -D [srcaddr:]srcport
114              Set up dynamic port forwarding. The client  listens  on  srcport
115              (or  srcaddr:srcport  if  specified),  and  implements  a  SOCKS
116              server. So you can point SOCKS-aware applications at  this  port
117              and they will automatically use the SSH connection to tunnel all
118              their connections. Only works in SSH.
119
120       -X     Enable X11 forwarding.
121
122       -x     Disable X11 forwarding (default).
123
124       -A     Enable agent forwarding.
125
126       -a     Disable agent forwarding (default).
127
128       -t     Enable pty allocation (default if a command is NOT specified).
129
130       -T     Disable pty allocation (default if a command is specified).
131
132       -1     Force use of SSH protocol version 1.
133
134       -2     Force use of SSH protocol version 2.
135
136       -4, -6 Force use of IPv4 or IPv6 for network connections.
137
138       -C     Enable SSH compression.
139
140       -i keyfile
141              Private key file for user authentication. For SSH-2  keys,  this
142              key  file must be in PuTTY's PPK format, not OpenSSH's format or
143              anyone else's.
144
145              If you are using an authentication agent, you can also specify a
146              public  key  here  (in  RFC 4716 or OpenSSH format), to identify
147              which of the agent's keys to use.
148
149       -noagent
150              Don't try to use an authentication agent for  local  authentica‐
151              tion. (This doesn't affect agent forwarding.)
152
153       -agent Allow  use of an authentication agent. (This option is only nec‐
154              essary to override a setting in a saved session.)
155
156       -no-trivial-auth
157              Disconnect from any  SSH  server  which  accepts  authentication
158              without  ever having asked for any kind of password or signature
159              or token. (You might want to enable this for a server you always
160              expect  to challenge you, for instance to ensure you don't acci‐
161              dentally type your key  file's  passphrase  into  a  compromised
162              server spoofing Plink's passphrase prompt.)
163
164       -noshare
165              Don't  test and try to share an existing connection, always make
166              a new connection.
167
168       -share Test and try to share an existing connection.
169
170       -hostkey key
171              Specify an acceptable host public key. This option may be speci‐
172              fied  multiple  times;  each  key  can  be  either a fingerprint
173              (SHA256:AbCdE..., 99:aa:bb:..., etc) or a base64-encoded blob in
174              OpenSSH's one-line format.
175
176              Specifying  this option overrides automated host key management;
177              only the key(s) specified on the command-line will  be  accepted
178              (unless  a saved session also overrides host keys, in which case
179              those will be added to), and the host  key  cache  will  not  be
180              written.
181
182       -s     Remote command is SSH subsystem (SSH-2 only).
183
184       -N     Don't start a remote command or shell at all (SSH-2 only).
185
186       -nc host:port
187              Make  a  remote  network  connection  from the server instead of
188              starting a shell or command.
189
190       -sercfg configuration-string
191              Specify the configuration parameters for  the  serial  port,  in
192              -serial  mode.  configuration-string should be a comma-separated
193              list of configuration parameters as follows:
194
195              Any single digit from 5 to 9  sets  the  number  of  data
196                     bits.
197
198              `1', `1.5' or `2' sets the number of stop bits.
199
200              Any other numeric string is interpreted as a baud rate.
201
202              A  single lower-case letter specifies the parity: `n' for
203                     none, `o' for odd, `e' for even, `m' for mark and `s' for
204                     space.
205
206              A  single  upper-case  letter specifies the flow control:
207                     `N' for none, `X' for XON/XOFF, `R' for RTS/CTS  and  `D'
208                     for DSR/DTR.
209
210       -sshlog logfile
211
212
213       -sshrawlog logfile
214              For  SSH  connections, these options make plink log protocol de‐
215              tails to a file. (Some of these may be  sensitive,  although  by
216              default an effort is made to suppress obvious passwords.)
217
218              -sshlog logs decoded SSH packets and other events (those that -v
219              would print). -sshrawlog additionally  logs  the  raw  encrypted
220              packet data.
221
222       -logoverwrite
223              If  Plink  is configured to write to a log file that already ex‐
224              ists, discard the existing file.
225
226       -logappend
227              If Plink is configured to write to a log file that  already  ex‐
228              ists, append new log data to the existing file.
229
230       -shareexists
231              Instead  of making a new connection, test for the presence of an
232              existing connection that can be shared. The desired session  can
233              be specified in any of the usual ways.
234
235              Returns  immediately  with a zero exit status if a suitable `up‐
236              stream' exists, nonzero otherwise.
237

MORE INFORMATION

239       For more information on plink, it's probably best to go and look at the
240       manual on the PuTTY web page:
241
242       https://www.chiark.greenend.org.uk/~sgtatham/putty/
243

BUGS

245       This  man page isn't terribly complete. See the above web link for bet‐
246       ter documentation.
247
248
249
250PuTTY tool suite                  2004‐03‐24                          plink(1)
Impressum