O'Reilly logo

Linux Pocket Guide, 2nd Edition by Daniel J. Barrett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required