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 on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).

Get it free on the App Store