Back to search

ssh

command network

Connect to a remote host via SSH

Required Packages

sudo apt install -y openssh-client

Options

Login as this user on the remote host

Hostname or IP address of the remote server

SSH port (default: 22)

Path to the private key file

Command to execute on the remote host (interactive shell if empty)

Forward the authentication agent connection

Show debugging messages (useful for troubleshooting)

Enable compression of data

Enable X11 forwarding for GUI applications

Disable pseudo-terminal allocation (for automated scripts)

Force pseudo-terminal allocation (for sudo on remote)

Forward local port to remote (e.g. 8080:localhost:80)

Forward remote port to local (e.g. 8080:localhost:80)

SOCKS proxy on local port (e.g. 1080)

Connect via a jump/bastion host (e.g. user@bastion)

Pass an option (e.g. StrictHostKeyChecking=no)

Generated Command

ssh