General use

Genrate SSH keypair:
ssh-keygen -t ed25519

Remove host from ~/.ssh/known_hosts:
ssh-keygen -R <host>

Copy local ssh-key to another server:
ssh-copy-id <host>

Connect to a server over a jump host – hopping:
ssh -t user@jumphost ssh user@target

update: since OpenSSH 7.3 it is possible to shorten this a bit more:
ssh -J user@jumphost user@target

SSH tunneling

Connect to port 80 on a remote server and build a tunnel to port 8000 on localhost:
ssh -L 8000:localhost:80 server -N

sshfs – mount Remote File Systems

this command mounts a directory from a remote machine into a local directory:
sshfs user@host:/path/on/host /local/path</pre>


must to be enabled in ssh_config and sshd_config:
ssh -X user@server <programm> &

Install packages used by remote machine

ssh remotehost 'dpkg --get-selections' | dpkg --set-selections && dselect install

-N = Do not execute a remote command
-t  = Force pseudo-terminal allocation
-V = Display the version number
-J = This is a shortcut to specify a ProxyJump