Replace ProxyJump in ~/.ssh/config

32

9

I'm am using ProxyJump in my ~/.ssh/config

Host jump                                                                          
  User jane                                                                       
  HostName 1.2.3.4
  DynamicForward 1028
Host dev                                                                        
  User bill                                                                      
  HostName 5.6.7.8                                                          
  ProxyJump jump

My colleague is using an old version of ssh (which they are unable to update). What would be the equivalent configuration to allow them to connect via the jump host? Would DynamicForward still work?

Sonia Hamilton

Posted 2017-09-27T02:44:25.117

Reputation: 445

What version of ssh is your colleague using? – Kenster – 2017-09-27T12:58:42.127

It's the OSX 10.10 version - ssh 6.x something. – Sonia Hamilton – 2017-09-28T01:37:44.060

Answers

43

ProxyJump was added in OpenSSH 7.3 but is nothing more than a shorthand for using ProxyCommand, as in:

Host hidden-host
  ProxyCommand ssh proxy-host -W %h:%p

If your ssh version is even older, you might lack the -W option, in which case you can use nc, as in:

Host hidden-host
  ProxyCommand ssh proxy-host nc %h %p 2> /dev/null

crimson-egret

Posted 2017-09-27T02:44:25.117

Reputation: 1 900

7In a terminal/cmd this would look like this: ssh -o ProxyCommand="ssh <proxy-host> -W %h:%p" <target> instead of ssh -J <proxy-host> <target> – igor – 2018-04-09T16:21:46.000