Beginner Package: openssh-client

ssh

Log in to a remote system securely.

Syntax

ssh [options] user@host

Description

ssh (Secure Shell) opens an encrypted remote login session, and is the standard way to administer Linux servers over a network — most other remote tools (scp, sftp, rsync -e ssh) build on top of it.

Examples

ssh alice@203.0.113.10
Log in to a remote host as a specific user
ssh -p 2222 alice@203.0.113.10
Connect on a non-default port
ssh -i ~/.ssh/id_ed25519 alice@203.0.113.10
Connect using a specific private key
ssh alice@host "df -h"
Run a single remote command without opening an interactive session

Applies to

Ubuntu Debian Linux Mint RHEL CentOS / Rocky / AlmaLinux Fedora Arch Linux openSUSE Alpine Linux

Put it into practice

Learn this in context