LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

plink

PuTTY command-line SSH connection tool

TLDR

Connect to SSH server
$ plink [user]@[host]
copy
Execute remote command
$ plink [user]@[host] [command]
copy
Use specific port
$ plink -P [port] [user]@[host]
copy
Use private key
$ plink -i [key.ppk] [user]@[host]
copy
SSH tunnel
$ plink -L [local_port]:[remote_host]:[remote_port] [user]@[host]
copy

SYNOPSIS

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

DESCRIPTION

plink is the command-line SSH connection tool from the PuTTY suite. It provides non-interactive SSH access for executing remote commands, port forwarding, and scripted SSH operations.Unlike the interactive PuTTY terminal, plink is designed for automation and batch operations. It supports SSH key authentication using PuTTY's .ppk key format. The -batch flag disables all interactive prompts, making it suitable for scripts and cron jobs.

PARAMETERS

HOST

Remote host (optionally prefixed with user@).
-ssh, -telnet, -rlogin, -raw, -serial
Force use of a specific protocol.
-P PORT
Connect to the specified port.
-l USER
Login username.
-pw PASSWORD
Login with the given password (insecure; prefer -pwfile).
-pwfile FILE
Read password from file.
-i KEY
Private key file for authentication (.ppk format).
-load SESSION
Load settings from a saved PuTTY session.
-L [bindaddr:]port:host:hostport
Forward local port to remote destination.
-R [bindaddr:]port:host:hostport
Forward remote port to local destination.
-D [bindaddr:]port
Dynamic SOCKS-based local port forwarding.
-N
Don't start a shell or command (SSH-2 only).
-T, -t
Disable/enable pseudo-terminal allocation.
-A, -a
Enable/disable agent forwarding.
-X, -x
Enable/disable X11 forwarding.
-m FILE
Read remote command(s) from file.
-batch
Disable all interactive prompts.
-v
Verbose output.
--help
Display help.

CAVEATS

Part of PuTTY. Uses PPK key format. Windows/Unix versions.

HISTORY

Plink is part of PuTTY for command-line SSH operations.

SEE ALSO

ssh(1), putty(1), pscp(1)

Copied to clipboard
Kai