美文网首页
跳板访问 ssh 服务

跳板访问 ssh 服务

作者: Lupino | 来源:发表于2021-09-28 22:36 被阅读0次

    我们有一些机器只能通过内网访问,通常情况下先登录到跳板机,然后在登录到目标机器。
    ssh 提供一个 -J JumpServer 的参数,让我们快速的通过跳板机登录目标机器

    ssh -J JumpServer targetServer
    

    我们也可以通过代理登录到目标机器,本机或者跳板机上开启 socks5 代理,通过指定 ProxyCommand 来登录目标机器。

    ssh -o 'ProxyCommand=nc -X 5 -x proxyhost:proxyport %h %p' targetServer
    

    相关文章

      网友评论

          本文标题:跳板访问 ssh 服务

          本文链接:https://www.haomeiwen.com/subject/fbfdnltx.html