(http://antbsd.twbbs.org/~ant/wordpress/?p=198, May 29th, 2006)
今天看了 lukhnos's blog,終於了解了 ssh -L 與 -R 的差別。
先來看 -L 的運作,以 lukhnos 的資料來作自我解析一番。
# ssh -L 8888:foobar.org:80 user@server.org
這個指令是指,在 Client 與 Server 建立一組 secure tunneling,並將 Client 上的 port 8888 經由 Client 的 port 22 到 Server 的 port 22,再到 foobar.org 的 port 80。
簡單而言,就是想要經由 server.org 連到不能連的 ports。
lukhnos 的示圖在此。
# ssh -R 3322:localhost:6942 user@server.org
這個指令是指,在 Client 與 Server 建立一組 secure tunneling,並將 Server 的 port 3322 經由 Server 的 port 22 到 Client 的 port 22,再到 localhost 的 port 6942。
簡單而言,就是希望 localhost 的服務能夠經由 server.org 的某 port 讓外面的人連入。
lukhnos 的示圖在此。
No comments:
Post a Comment