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?