在專家的幫助下,我建立了一個ssh隧道。伺服器端已全部設定完畢(我擁有伺服器),我可以使用以下命令設定客戶端(在 Mac/Linux 上):
ssh -f johndoe@severip -L 8080:localhost:8008 -N
但是,我不完全理解上面的命令。 (例如,我不確定這是c2s還是s2c)現在我想為Windows客戶端設定相同的東西。我想使用 Bitvise 作為 ssh 用戶端,但我不知道如何設定它。
問題:如何設定 Bitvise 才能實現與上述 Linux 指令相同的功能?
編輯1: 我按照以下方式在 Windows 和 Bitvise 上設定代理設定: 透過 Bitvise 登入後,瀏覽器(在我的情況下是 IE 和 Chrome)只會返回存取被拒絕。從Bitvise的日誌來看,似乎有很多東西在上漲,但並沒有什麼幫助。
答案1
來自ssh(1)
手冊頁
-L [bind_address:]port:host:hostport
Specifies that the given port on the local (client) host is to be
forwarded to the given host and port on the remote side.
所以 -L 8080:localhost:8008
會轉發
- (客戶端)8080
- 到伺服器 serverip 上的 localhost
- 在連接埠 8008 上。
我猜您希望 http:// localhost:8080 對應到 http:// serverip:8008 (無法從客戶端直接存取 serverip:8008 )。
你在C2S(客戶端2伺服器)上。