
リモート SSH 接続を確立しようとします。
「リモート」を接続しようとしましたssh -fN -R 10110:localhost:22 GatewayUser@GatewayHost
そして「ゲートウェイ」ssh -p10110 RemoteUser@localhost
ゲートウェイコンソールで応答が返ってきましたConnection closed by ::1
-vで実行するssh -v -fN -R 10110:localhost:22 GatewayUser@GatewayHost
リモートコンソールでその応答を生成します
debug1: client_input_global_request: rtype [email protected] want_reply 1
debug1: client_input_global_request: rtype [email protected] want_reply 1
debug1: client_input_channel_open: ctype forwarded-tcpip rchan 2 win 2097152 max 32768
debug1: client_request_forwarded_tcpip: listen localhost port 10110, originator ::1 port 48481
debug1: connect_next: host localhost ([127.0.0.1]:22) in progress, fd=4
debug1: channel 0: new [::1]
debug1: confirm forwarded-tcpip
debug1: channel 0: connected to localhost port 22
debug1: channel 0: free: ::1, nchannels 1
debug1: client_input_global_request: rtype [email protected] want_reply 1
debug1: client_input_global_request: rtype [email protected] want_reply 1
PS: リモートからゲートウェイへの SSH 接続は機能しています
よろしくお願いします!
__
ゲートウェイマシンから接続したときのコンソール出力は次のとおりですemanuel@UbuntuServer:~$ ssh -vvv -p10110 pi@localhost
OpenSSH_6.7p1 Ubuntu-5ubuntu1.3, OpenSSL 1.0.1f 6 Jan 2014
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 localhost [::1] port 10110.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/emanuel/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/emanuel/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/emanuel/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/emanuel/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/emanuel/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/emanuel/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/emanuel/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/emanuel/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.7p1 Ubuntu-5ubuntu1.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.0p1 Debian-4+deb7u2
debug1: match: OpenSSH_6.0p1 Debian-4+deb7u2 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug3: put_host_port: [localhost]:10110
debug3: load_hostkeys: loading entries for host "[localhost]:10110" from file "/home/emanuel/.ssh/known_hosts"
debug3: load_hostkeys: loaded 0 keys
debug1: SSH2_MSG_KEXINIT sent
Connection closed by ::1
emanuel@UbuntuServer:~$
答え1
やるべきことは、raspi からゲートウェイへの ssh 接続を作成し、ゲートウェイからの *:10110 を raspi の 127.0.0.1:22 に転送することです。次に、ポート 10110@localhost に接続します。このポートは、一部の構成では、背後にトンネルのない ip6 アドレス (::1) を使用する場合があります。その後、sshd は接続を閉じます。試してください。
ssh -4 -p10110 pi@localhost
これでもう一歩前進できるはずです。正しい鍵を見つけるのに問題がある場合(sshは一定数の鍵をチェックした後に停止します)、pubkeyauthを無効にしてください。
ssh -oPubkeyAuthentication=no -4 -p10110 pi@localhost
答え2
クライアントは IPv6 経由ssh
で接続しているようですsshd
。sshd
IPv6 アドレスを listen していますか? 次の行を追加し/etc/ssh/sshd_config
て再起動してくださいsshd
:
ListenAddress ::
または、引数を使用して IPv4 接続を強制することもできますssh -4
。