Linux

ssh

CautionRemote shell

ssh <user>@<host>

Opens an SSH session to a remote host; -p sets the port.

Examples

  • ssh -p 2222 admin@server01Connect on a custom port

Syntax

ssh [-p port] <user>@<host>

Before you run it

Connects to live hosts; act carefully.

Used when you see

Can't SSH into EC2
3
Run ssh -vvv to see where it stalls
See the whole flow →
SSH key auth fails
1
Connect with -vvv and watch key negotiation
See the whole flow →

Related commands

  • scpCopy over SSH

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store