`错误的stdio转发规范'%h:%p'`出现在ssh选项中,但不会出现〜/ .ssh / config

我在~/.ssh/config下面写了转发设置,并且ssh destination工作正常(成功login到destination ):

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

但是下面的命令返回错误:

 $ ssh -oProxyCommand='ssh -W %h:%p gateway' [email protected] Bad stdio forwarding specification '%h:%p' 

ssh版本(macOS High Sierra):

 $ ssh -V OpenSSH_7.5p1, LibreSSL 2.5.4 

这些设置有什么区别? 我怎么能通过使用-oProxyCommand选项的堡垒ssh