SSHがVPNのサーバーに接続できない

SSHがVPNのサーバーに接続できない

x.x.x.xVPNのサーバーと同じサーバーにアクセスしたいです。 VPNゲートウェイはですy.y.y.y。 openconnect VPN クライアントを使用してゲートウェイに接続し、y.y.y.yVPN 資格情報を使用して正常に接続できます。

x.x.x.xVPNに接続した後、PingとTracerouteの実行も成功します。奇妙なことに、x.x.x.x私のユーザー名としてsshを使用して接続しようとすると、sshコマンドが停止し、パスワードの入力を求められないことがあります。次のコマンドを使用して接続します。

ssh [email protected]

私はUbuntu 16.04とVPNクライアントopenconnectを使用しています。


アップデート1

UbuntuのpuTTYを使用してサーバーに接続できました。これは、サーバーがインバウンドSSH接続を許可することを意味します。しかし、まだ混乱しているのは、コマンドラインのsshがまだサーバーに接続できないことです。netcat x.x.x.x 22VPNに接続して実行した後、応答は次のようになりますSSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.4

X11転送が必要で、sshで-Xフラグを使用してこれを行うことができるので、コマンドラインでsshを使用して接続したいと思います。

また、UbuntuではpuTTYでX11転送を使用することはできません(XmingのおかげでWindowsでは簡単です)。


アップデート2

sshは-dが不明なオプションであるというエラーを発生させます。 -v(verbose) フラグを指定して ssh を使ってみました。出力は次のとおりです。

OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g  1 Mar 2016
debug1: Reading configuration data /home/varshaneya/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to x.x.x.x [x.x.x.x] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/varshaneya/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/varshaneya/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/varshaneya/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/varshaneya/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/varshaneya/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/varshaneya/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/varshaneya/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/varshaneya/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.4
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to x.x.x.x:22 as 'user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY

それから止まる…

ベストアンサー1

私の質問に対する答えを見つけましたここスーパーユーザーサイトから。ソリューションを提供してくれた@jagguliに感謝します。

デフォルトでは、イーサネット接続のMTUサイズを小さくする必要があり、これが成功しました。確認するこれ出て。

おすすめ記事