Open a remote shell as alice.
ssh alice@example.comConnect securely to a remote machine using its account and host name.
ssh [OPTION]... [USER@]HOST [COMMAND]Open a remote shell as alice.
ssh alice@example.comConnect on a custom port using a selected key.
ssh -p 2222 -i ~/.ssh/id_ed25519 alice@example.com| Option / clause | Description |
|---|---|
-p PORT | Connect to PORT on the remote host. |
-i IDENTITY_FILE | Use the specified private key file. |
-J DEST | Connect through a jump host. |
-L [BIND:]PORT:HOST:HOSTPORT | Forward a local port to a remote destination. |
-N | Do not run a remote command; useful for forwarding only. |
-v | Show verbose connection diagnostics; repeat for more detail. |
Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.