ssh ProxyJump
(),
Syntax
ssh -J jump_host [user@]target_host
Parameters
| Parameters | Description | Examples | Level |
|---|---|---|---|
-J ProxyJump |
ssh -J bastion user@internal |
Common | |
-W |
(ProxyCommand ) | ssh -o ProxyCommand="ssh -W %h:%p bastion" user@internal |
Advanced |
ProxyJump |
ProxyJump user@bastion:22 |
Common | |
|
ssh -J bastion1,bastion2 user@target |
Advanced |
Examples
ssh -J user@bastion.example.com admin@10.0.0.50
ssh -J bastion1,bastion2 user@final-target
Host internal-* ProxyJump bastion User admin Host bastion HostName bastion.example.com User jump-user
ssh internal-db bastion
scp -o ProxyJump=user@bastion file.txt admin@10.0.0.50:/tmp/
scp
Common Errors
ssh: Could not resolve hostname bastion, IP /etc/hosts
channel 0: open failed: administratively prohibitedTCP, Contact AllowTcpForwarding
Tips
- ProxyJump(-J) OpenSSH 7.3+ New, ProxyCommand
- ,
- config, scp/sftp/rsync and more