Advance ssh config file

青春壹個敷衍的年華 提交于 2019-11-28 10:38:42

Set your ~/.ssh/config:

Host Jump1
  User jump1user
  Port 2222
Host Jump2
  ProxyCommand ssh -W %h:%p Jump1
  User jump2user
Host RemoveServer
  ProxyCommand ssh -W %h:%p Jump2
  User remoteUser

Or with new OpenSSH 7.3:

Host RemoveServer
  ProxyJump jump1user@Jump1,jump2user@Jump2
  User remoteUser

Then you can connect simply using ssh RemoteServer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!