How it works...

The -J and ProxyJump options are a way to connect through a specified host, to a host beyond.

The manual entry from the official manual pages (https://man.openbsd.org/ssh) for -J [user@]host[:port] is as follows:

Connect to the target host by first making a ssh connection to the jump host described by destination and then establishing a TCP forwarding to the ultimate destination from there. Multiple jump hops may be specified separated by comma characters. This is a shortcut to specify a ProxyJump configuration directive.

The manual entry from https://man.openbsd.org/ssh_config for ProxyJump is as follows:

Specifies one or more jump proxies as either [user@]host[:port] or an ssh URI. Multiple proxies may be separated by comma ...

Get Linux Administration Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.