authentication - 在主机名上接受 raspberryPI 上的 ssh 登录,但在本地 IP 上不接受
问题描述
我有一个 raspPi 作为本地服务器工作。最近我不得不更新https自签名证书(5年后突然......)
现在看似无关我可以在执行 ssh pi@myhostname 时登录
(base) me@<other>:~$ ssh pi@<hostname>
pi@<hostname>'s password:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
You have new mail.
Last login: Tue Nov 26 07:44:43 2019 from <other>.home
pi@<hostname>:~ $
但是尝试使用 pi@192.168.1.xxx 登录不接受我的密码(相信我已经尝试过很多次了)
(base) me@<other>:~$ ssh pi@192.168.1.xxx
pi@192.168.1.xxx's password:
Permission denied, please try again.
pi@192.168.1.xxx's password:
我从来没有遇到过这样的事情。请注意,我必须使用这两种方法重新接受 pi 作为已知主机(因为证书更新?),同时我已经更换了计算机。我试过谷歌,但找不到任何提示我在哪里搜索的东西。
这里是 ssh -v pi@192.168.1.xxx 的输出
(base) me@<other>:~$ ssh -v pi@192.168.1.xxx
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.1.xxx [192.168.1.xxx] port 22.
debug1: Connection established.
debug1: identity file /home/me/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file /home/me/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/me/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/me/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/me/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/me/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/me/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/me/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
debug1: match: OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.1.xxx:22 as 'pi'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:8ofojxAYFocyI8FVe4mSzUXk/+qb7vARTRir30zJ6xo
debug1: Host '192.168.1.xxx' is known and matches the ECDSA host key.
debug1: Found key in /home/me/.ssh/known_hosts:34
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh- dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: RSA SHA256:0xagiyXErFhFPGMqVlyzbNWP+cXgJ2viL1KhAww380s /home/me/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Offering public key: RSA SHA256:a0FFNOSt5iM6wbF3xgEMwolqayoI4E6TfmLtq14zGG0 me@<yet another>
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/me/.ssh/id_dsa
debug1: Trying private key: /home/me/.ssh/id_ecdsa
debug1: Trying private key: /home/me/.ssh/id_ed25519
debug1: Next authentication method: password
pi@192.168.1.xxx's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
pi@192.168.1.xxx's password:
解决方案
推荐阅读
- java - 使用 Java 线程的 setTimeout
- python - (python) 在 DataFrame 中使用 diff() 函数
- r - 跨行排序以获得三个最大值
- elasticsearch - Elasticsearch如何替换“terms”查询?
- geospatial - Marklogic geojson 搜索
- svg - 如何将此图像“覆盖”到我的路径?
- debian - 在 Debian 上设置 Mozilla Pontoon
- ruby-on-rails - FactoryGirl 不知道新专栏
- .net - 编译器通过位移操作将按位与添加到表达式树中
- python - numpy 如何通过将 64 位数据转换为 32 位或更低的 dtypes 来减少计算时间