0

I wrote forwarding settings below in~/.ssh/config and ssh destination works well (successfully logged in to destination):

Host gateway
  User ikuwow
  Hostname gateway.example.com

Host destination
  User ikuwow
  Hostname destination.localname
  ProxyCommand ssh -W %h:%p gateway

But the command below returns error:

$ ssh -oProxyCommand='ssh -W %h:%p gateway' ikuwow@destination.localname
Bad stdio forwarding specification '%h:%p'

ssh version (macOS High Sierra):

$ ssh -V
OpenSSH_7.5p1, LibreSSL 2.5.4

What is the difference between these settings? How can I ssh through bastions using the -oProxyCommand option?

ikuwow
  • 1
  • 1
  • 3
  • I've just opened a similar question here: https://serverfault.com/questions/887924/ssh-with-a-bastion-host-stdio-forwarding-failed – Stephen Dec 13 '17 at 14:55

1 Answers1

0

Don't know if it's still actual for u, but this trick works well in an older manner:

Host 172.16.*.*
  ProxyCommand ssh gateway_server nc %h %p
acd
  • 1