顯示頁面舊版反向連結Fold/unfold all回到頁頂 本頁是唯讀的,您可以看到原始碼,但不能更動它。您如果覺得它不應被鎖上,請詢問管理員。 ====== 建立 SSH Tunnel 語法 ====== 這是兩年前寫在舊 blog 上面的紀錄, 剛好今天要用到, 所以就拉出來整理在這邊.. --- //[[tryweb@ichiayi.com|蔡宗融]] 2008/10/08 09:42// ==== - 透過遠端 InterServer-B 的主機連進來 IntraServer-A 的主機 ==== {{https://www.ichiayi.com/blog/images/ssh_tunnel/ssh_tunnel_1.gif}} * 先登入 IntraServer-A * 執行 <cli> ssh -nNT -R 9022:192.168.0.39:22 jonathan@61.67.71.95 </cli> * 由 IntraServer-A 以 jonathan 身分 ssh 連上 InterServer-B * 同時建立 ssh tunnel, 讓 InterServer-B 所 Listen 的 Port 9022 就是通到 IntraServer-A 的 Port 22 * 這時在 InterServer-B 內下 ssh engineer@localhost -p 9022 就可以由 InterServer-B 以 engineer 身分 ssh 連上 IntraServer-A ==== - 透過遠端 InterServer-B 的主機經 IntraServer-A 連進來 IntraServer-C 的主機 ==== {{https://www.ichiayi.com/blog/images/ssh_tunnel/ssh_tunnel_2.gif}} * 先登入 IntraServer-A * 執行 <cli> ssh -nNT -R 9022:10.1.1.2:22 jonathan@61.67.71.95 </cli> * 由 IntraServer-A 以 jonathan 身分 ssh 連上 InterServer-B * 然後建立 ssh tunnel, 讓 InterServer-B 所 Listen 的 Port 9022 就是通到 IntraServer-C 的 Port 22 * 這時在 InterServer-B 內下 ssh engineer@localhost -p 9022 就可以由 InterServer-B 以 engineer 身分 ssh 連上 IntraServer-C {{tag>ssh tunnel 密技}} tech/ssh_tunnel.txt 上一次變更: 2021/01/16 06:40由 jonathan