Jumphost

In some situations (e.g. security reasons) it's necessary to log in on a SSH jumhost first and from there to the final SSH destination.

[personal computer] ssh <user>@jumphost.example.com
[jumphost] ssh <user>@sfinalhost.example.com

[personal computer] ssh -J <user>@jumphost.example.com <user>@sfinalhost.example.com

# File `~/.ssh/config` (on personal computer):
Host jumphost
        Hostname jumphost.example.com

Host finalhost
        User <user>
        Hostname finalhost.example.com
        ProxyJump jumphost

# Just type
[personal computer] ssh finalhost

Tip: if a host shows anoying banner on logging, suppress it by:

$ ssh -o LogLevel=error <user>@<host>

# the option can also specified in ~/.ssh/config in general 
LogLevel error

# the option can also specified in ~/.ssh/config per host
Host finalhost
  LogLevel error