Ubuntuサーバーに問題があります。このサーバーから2番目のサーバーにSSHを試みると、次のエラーが発生します。
federico@federico:~/.ssh$ ssh [email protected] -vvv
OpenSSH_7.2p2 Ubuntu-4ubuntu1, OpenSSL 1.0.2g-fips 1 Mar 2016
debug1: Reading configuration data /home/federico/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "federicolivieri.noip.me" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to federicolivieri.noip.me [95.144.54.179] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/federico/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/federico/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/federico/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/federico/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/federico/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/federico/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/federico/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/federico/.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-4ubuntu1
debug1: ssh_exchange_identification: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
debug1: ssh_exchange_identification: <html><head>
debug1: ssh_exchange_identification: <title>400 Bad Request</title>
debug1: ssh_exchange_identification: </head><body>
debug1: ssh_exchange_identification: <h1>Bad Request</h1>
debug1: ssh_exchange_identification: <p>Your browser sent a request that this server could not understand.<br />
debug1: ssh_exchange_identification: </p>
debug1: ssh_exchange_identification: <hr>
debug1: ssh_exchange_identification: <address>Apache/2.4.10 (Raspbian) Server at 127.0.1.1 Port 80</address>
debug1: ssh_exchange_identification: </body></html>
ssh_exchange_identification: Connection closed by remote host
しかし、/home/federico/.ssh/でid_rsaを見ることができます。
federico@federico:~/.ssh$ ls -l
total 76
-rw-r--r-- 1 federico federico 1265 Jun 29 14:10 config
-rw-r--r-- 1 federico federico 3261 Jun 22 09:59 id_rsa
-rw-r--r-- 1 federico federico 727 Jun 22 09:59 id_rsa.pub
-rw-r--r-- 1 federico federico 11906 Jul 19 09:28 known_hosts.bak
-rw-r--r-- 1 federico federico 9682 Jun 30 09:04 known_hosts.old
私はこのエラーを調べましたが、誰もが異なる提案をしましたが、その解決策は私にはうまくいきませんでした。どんなアイデアがありますか?
ありがとう
答え1
-rw-r--r-- 1 Federico Federico3261 6月22日 09:59 id_rsa
キーを読み取って保護する必要があります。
chmod 600 .ssh/id_rsa