key_load_public:连接到 ssh 时没有这样的文件或目录

key_load_public:连接到 ssh 时没有这样的文件或目录

我有一台 Windows 10 电脑,我想要连接并使用其互联网连接。

所以我已经安装openssh并运行它。当我使用时ssh <username>@<pcname>,出现错误:

ssh_exchange_identification: read: Connection reset by peer

如果我使用ssh -v <usrename>@<PCname>,我会得到这个日志:

 ~:$ ssh -v [email protected]
 OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g-fips  1 Mar 2016
 debug1: Reading configuration data /etc/ssh/ssh_config
 debug1: /etc/ssh/ssh_config line 19: Applying options for *
 debug1: Connecting to 192.168.1.100 [192.168.1.100] port 22.
 debug1: Connection established.
 debug1: identity file /home/senaps/.ssh/id_rsa type 1
 debug1: key_load_public: No such file or directory
 debug1: identity file /home/senaps/.ssh/id_rsa-cert type -1
 debug1: key_load_public: No such file or directory
 debug1: identity file /home/senaps/.ssh/id_dsa type -1
 debug1: key_load_public: No such file or directory
 debug1: identity file /home/senaps/.ssh/id_dsa-cert type -1
 debug1: key_load_public: No such file or directory
 debug1: identity file /home/senaps/.ssh/id_ecdsa type -1
 debug1: key_load_public: No such file or directory
 debug1: identity file /home/senaps/.ssh/id_ecdsa-cert type -1
 debug1: key_load_public: No such file or directory
 debug1: identity file /home/senaps/.ssh/id_ed25519 type -1
 debug1: key_load_public: No such file or directory
 debug1: identity file /home/senaps/.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.1
 ssh_exchange_identification: read: Connection reset by peer

我好像没有这些文件,但是如何获取它们呢?这是ls我的目录:

 ~:$ ls -a .ssh
 .  ..  id_rsa  id_rsa.pub  known_hosts

我应该如何解决这个问题? (我猜我无权访问我的电脑,并且想通过我的电脑网络而不是我所在的公共网络发送流量。)

这是一个-vvv日志:

~:$ ssh -vvv [email protected]
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g-fips  1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "192.168.1.100" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 192.168.1.100 [192.168.1.100] port 22.
debug1: Connection established.
debug1: identity file /home/senaps/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/senaps/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/senaps/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/senaps/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/senaps/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/senaps/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/senaps/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/senaps/.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.1
ssh_exchange_identification: read: Connection reset by peer

和来自的日志tail -500 /var/log/auth.log | grep 'sshd'

Sep 22 08:23:29 SenapssPC sshd[2853]: Received SIGHUP; restarting.
Sep 22 08:23:29 SenapssPC sshd[2853]: Server listening on 0.0.0.0 port 22.
Sep 22 08:23:29 SenapssPC sshd[2853]: Server listening on :: port 22.
Sep 22 19:41:29 SenapssPC sudo:   senaps : TTY=pts/2 ; PWD=/home/senaps ; USER=root ; COMMAND=/bin/nano /etc/ssh/sshd_config
Sep 22 19:42:02 SenapssPC sudo:   senaps : TTY=pts/2 ; PWD=/home/senaps ; USER=root ; COMMAND=/bin/nano /etc/ssh/sshd_config

相关内容