Zum Inhalt springen
PuTTY Kommandozeilenparameter

PuTTY Kommandozeilenparameter

General

ParameterDescription
-load <sessionname>load a saved session
-sshSSH Protocol
-telnetTelnet Protocol
-rloginrlogin Protocol
-serialSerial Connection
-rawraw Protocol
-vincrease verbosity
-P <port>specify a port number
-l <username>specify a login name
-m <filename>read a remote command or script from a file
-pgpfpThis option causes the PuTTY tools not to run as normal, but instead to display the fingerprints of the PuTTY PGP Master Keys, in order to aid with verifying new versions.
-cleanupRemove its registry entries and random seed file from the local machine (after confirming with the user).
On multi-user systems, only removes registry entries and files associated with the currently logged-in user.

Network

ParameterDescription
-4use IPv4
-6use IPv6

Serial

ParameterDescription
-sercfgThis option specifies the configuration parameters for the serial port (baud rate, stop bits etc).

Its argument is interpreted as a comma-separated list of configuration options, which can be as follows:
- Any single digit from 5 to 9 sets the number of data bits.
- “1”, “1.5” or “2” sets the number of stop bits.
- Any other numeric string is interpreted as a baud rate.
- A single lower-case letter specifies the parity: “n” for none, “o” for odd, “e” for even, “m” for mark and “s” for space.
- A single upper-case letter specifies the flow control: “N” for none, “X” for XON/XOFF, “R” for RTS/CTS and “D” for DSR/DTR.

For example, -sercfg 19200,8,n,1,N denotes a baud rate of 19200, 8 data bits, no parity, 1 stop bit and no flow control.

SSH

ParameterDescription
-1SSH Version 1
-2SSH Version 2
-Cenable compression
-pw <password>specify a password, only for SSH - not recommended
-i <filename>specify an SSH private key
-Xenable X11 forwarding
-xdisable X11 forwarding
-Nsuppress starting a shell or command
-ncmake a remote network connection in place of a remote shell or command
-tenable pseudo-terminal allocation
-Tdisable pseudo-terminal allocation
-Aenable SSH agent forwarding
-adisable SSH agent forwarding
-[no]agentde-/activate SSH agent authentication
-loghost <host>This option overrides PuTTY’s normal SSH host key caching policy by telling it the name of the host you expect your connection to end up at (in cases where this differs from the location PuTTY thinks it’s connecting to). It can be a plain host name, or a host name followed by a colon and a port number.
-hostkey <key>This option overrides PuTTY’s normal SSH host key caching policy by telling it exactly what host key to expect, which can be useful if the normal automatic host key store in the Registry is unavailable. The argument to this option should be either a host key fingerprint, or an SSH-2 public key blob.
-L, -R and -DTo forward a local port (say 5110) to a remote destination (say popserver.example.com port 110), you can write something like one of these:
putty -L 5110:popserver.example.com:110 -load mysession
plink mysession -L 5110:popserver.example.com:110

To forward a remote port to a local destination, just use the -R option instead of -L:
putty -R 5023:mytelnetserver.example.com:23 -load mysession
plink mysession -R 5023:mytelnetserver.example.com:23

To specify an IP address for the listening end of the tunnel, prepend it to the argument:
plink -L 127.0.0.5:23:localhost:23 myhost.example.com

To set up SOCKS-based dynamic port forwarding on a local port, use the -D option. For this one you only have to pass the port number:
putty -D 4096 -load mysession

Logging

ParameterDescription
-sessionlog <filename>selects All session output logging mode.
-sshlog <filename>selects SSH packets logging mode.
-sshrawlog <filename>selects SSH packets and raw data logging mode.

Ursprüngliche Quelle: Offizielle PuTTY Dokumentation

Zuletzt aktualisiert am