2014-01-23 90 views
0

我是一個與網絡相關的一切新手,我想通過另一臺服務器(隧道)訪問遠程客戶端, 說例如遠程客戶端11.11.111.111與用戶名user2和密碼2 ,並通過11.11.10.01與用戶名user1和password1通過隧道SSH通過隧道訪問遠程客戶端

我可以ping通地址隧道地址。 但是當我嘗試訪問使用cygwin的遠程客戶端:

ssh -vv -o 'ProxyCommand ssh -vv [email protected] nc %h %p' [email protected] 

我得到這個錯誤:

OpenSSH_6.4, OpenSSL 1.0.1f 6 Jan 2014 
debug2: ssh_connect: needpriv 0 
debug1: Executing proxy command: exec ssh -vv [email protected] nc 11.11.111.111 22 
debug1: permanently_drop_suid: 146765 
debug1: identity file /home/user1/.ssh/id_rsa type -1 
debug1: identity file /home/user1/.ssh/id_rsa-cert type -1 
debug1: identity file /home/user1/.ssh/id_dsa type -1 
debug1: identity file /home/user1/.ssh/id_dsa-cert type -1 
debug1: identity file /home/user1/.ssh/id_ecdsa type -1 
debug1: identity file /home/user1/.ssh/id_ecdsa-cert type -1 
debug1: Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_6.4 
OpenSSH_6.4, OpenSSL 1.0.1f 6 Jan 2014 
debug2: ssh_connect: needpriv 0 
debug1: Connecting to 11.11.10.01 [11.11.10.01] port 22. 
debug1: connect to address 11.11.10.01 port 22: Connection timed out 
ssh: connect to host 11.11.10.01 port 22: Connection timed out 
ssh_exchange_identification: Connection closed by remote host 

就是我的命令正確,就可能導致什麼想法?

有什麼方法可以排除故障(最好是在我的機器上,而不是在服務器和遠程客戶端上)?

+0

您是否在11.11.10.01上安裝了nc? –

+0

我無法訪問它並驗證,有沒有一種方法可以遠程識別? –

+0

你可以用'ssh user1 @ 11.11.10.01'連接嗎? –

回答

1

我相信這只是一個局部的答案,但嘗試使用ssh連接到11.11.10.01有:

ssh [email protected] -L20022:11.11.111.111:22

,然後在另一個窗口連接通過:

ssh [email protected] -p20022

在這樣你會在第一個終端窗口中看到你的錯誤。