SSH config file host entry ssh
Shorthand alias: 'ssh dev' triggers all options
cat >> ~/.ssh/config <<'EOF'
Host dev
HostName 10.0.0.5
User ubuntu
IdentityFile ~/.ssh/dev_key
ProxyJump bastion
EOF
more ssh
all 15 commands →
Escape sequences in session
~.
Check SSH server host key
ssh-keyscan -t ed25519,rsa host 2>/dev/null | ssh-keygen -lf -
Restrict authorized key
echo 'from="10.0.0.0/8",no-agent-forwarding,no-port-forwarding,command="/usr/bin/backup.sh" <pubkey>' >> ~/.ssh/authorized_keys
Connect with specific key
ssh -i ~/.ssh/id_ed25519 user@host
ProxyJump through bastion
ssh -J bastion.example.com user@internal-host