4

SSH でリモート ホストに接続するのに問題がありますが、ホーム ネットワーク (プロバイダー) でのみです。私が別のネットワーク (同じ都市の友人 - 別のプロバイダー) にいる場合、接続は完璧に機能します。サーバー(自宅)へのpingは機能します。また、この問題はこのサーバーでのみ発生します。ホーム ネットワークから他のホストに接続しようとすると、機能します。私は何をすべきか?

nich@ubuntu:/etc$ ssh -vvv xxx@www.sci.muni.cz
OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to www.sci.muni.cz [147.251.24.3] port 22.
debug1: Connection established.
debug1: identity file /home/nich/.ssh/id_rsa type -1
debug1: identity file /home/nich/.ssh/id_rsa-cert type -1
debug1: identity file /home/nich/.ssh/id_dsa type -1
debug1: identity file /home/nich/.ssh/id_dsa-cert type -1
debug1: identity file /home/nich/.ssh/id_ecdsa type -1
debug1: identity file /home/nich/.ssh/id_ecdsa-cert type -1
ssh_exchange_identification: Connection closed by remote host

nich@ubuntu:/etc$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.2 LTS
Release:        12.04
Codename:       precise
4

1 に答える 1

6

トンネルの作成を試みる方法は次のとおりです。

  • intermediaryあなたのために転送を行う信頼できるマシンです
  • remoteあなたが到達しようとしているマシンです

    ssh -N -L 20000:remote:22 user@intermediary
    

これを行うと、ローカル マシンはポート 20000 でリッスンします。ホストのこのポートに ssh で接続すると、接続はトンネル経由で に転送intermediaryされ、次に に転送されremoteます。

于 2013-02-10T21:43:42.413 に答える