ssh, scp — connecting and copying over SSH
cheat sheet · OpenSSH 9.6 https://lab.dimsanych.ru/en/wiki/ssh-client/Cheat sheet
-
ssh user@hostconnect -
ssh -p 2222 user@hostnon-default port -
scp file user@host:/path/copy a file to the server -
ssh -L 8080:localhost:80 hostlocal tunnel -
ssh -J bastion hostconnect through a bastion -
ssh-keygen -R hostremove a stored host key
Options
To avoid repeating parameters, use host aliases in ~/.ssh/config:
Now just ssh web. Useful extras: ServerAliveInterval 60 (keep the
session alive), ProxyJump bastion (through a bastion).