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.

INSTALL

sudo apt install putty-tools
copy
sudo dnf install putty
copy
sudo pacman -S putty
copy
sudo apk add putty
copy
sudo zypper install putty
copy
brew install putty
copy
nix profile install nixpkgs#putty
copy

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)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid