Name

ssh — stdin  stdout  - file  -- opt  --help  --version

Synopsis

ssh [options] host [command]

The ssh (Secure Shell) program securely logs you into a remote machine where you already have an account:

$ ssh remote.example.com

Alternatively, it can invoke a program on that remote machine without logging you in:

$ ssh remote.example.com who

ssh encrypts all data that travels across its connection, including your username and password (which you’ll need to access the remote machine). The SSH protocol also supports other ways to authenticate, such as public keys and host IDs. See man sshd for details.

Useful options

-l user

Specify your remote username; otherwise, ssh assumes your local username. You can also use the syntax username@host:

$ ssh smith@server.example.com

-p port

Use a port number other than the default (22).

-t

Allocate a tty on the remote system; useful when trying to run a remote command with an interactive user interface, such as a text editor.

-v

Produce verbose output, useful for debugging.

Get Linux Pocket Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.