Run remote command ssh
Execute a command over SSH without interactive shell
ssh user@host 'sudo systemctl status nginx'
more ssh
all 15 commands →
Copy file via SCP
scp -r -P 2222 ./dist/ user@host:/var/www/app/
Agent forwarding
ssh -A user@bastion
Add key to agent
eval $(ssh-agent) && ssh-add ~/.ssh/id_ed25519
SSH config file host entry
cat >> ~/.ssh/config <<'EOF'
Host dev
HostName 10.0.0.5
User ubuntu
IdentityFile ~/.ssh/dev_key
ProxyJump bastion
EOF
Escape sequences in session
~.