wiki:jazz/20-10-14

Version 1 (modified by jazz, 4 years ago) (diff)

--

2020-10-14

SSH

  • 工作上需要經過兩層跳板機才能存取到 AWS EMR,先前使用 .ssh\config 裡面的 ProxyCommand,但跳板機的設定比較嚴,研究了一下解法,除了靠 ssh -J userA@跳板機A,userB@跳板機B userC@目的機 以外,也可以使用 .ssh\config 裡的 ProxyJump
  • manpage 說明: man ssh_config
    ProxyJump
                 Specifies one or more jump proxies as either [user@]host[:port] or an ssh URI.  Multiple proxies may be
                 separated by comma characters and will be visited sequentially.  Setting this option will cause ssh(1)
                 to connect to the target host by first making a ssh(1) connection to the specified ProxyJump host and
                 then establishing a TCP forwarding to the ultimate target from there.
    
                 Note that this option will compete with the ProxyCommand option - whichever is specified first will pre-
                 vent later instances of the other from taking effect.
    
                 Note also that the configuration for the destination host (either supplied via the command-line or the
                 configuration file) is not generally applied to jump hosts.  ~/.ssh/config should be used if specific
                 configuration is required for jump hosts.