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