$ ssh
OpenSSH remote login client
DOCUMENTEDNetworkingUbuntu 24.04 LTS baseline
Synopsis
ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface] [-b bind_address] [-c cipher_spec] [-D [bind_address:]port] ... destination [command [argument ...]]
What it does
- `ssh` connects to a remote host and can execute a command there.
- Host keys and authentication are part of SSH's security model; verify host identity before accepting an unexpected key.
Examples
Connect to a remote host
ssh user@example.comConnect to a specific port
ssh -p 2222 user@example.comRun one remote command
ssh user@example.com 'uname -a'Important details
These examples are intentionally conservative. Command behavior can still depend on filesystem state, permissions, locale, shell, installed package version, and other system configuration.
For exact option semantics, the linked authoritative documentation is the source of truth.