有人可以帮忙吗?我在Windows 7中安装了openssh(版本OpenSSH_6.8p1,OpenSSL 1.0.2a)并且我已经生成了公钥和私钥,但是我无法连接到该SSH . 如果我使用命令“ssh localhost”,我收到错误“连接关闭127.0.0.1” .

但是我可以通过“ssh localhost -o PubkeyAuthentication = no”跳过公钥认证来连接

输出命令“ssh -v localhost”

OpenSSH_6.8p1,OpenSSL 1.0.2a 2015年3月19日debug1:读取配置数据/ etc / ssh_config debug1:连接到localhost [127.0.0.1]端口22. debug1:已 Build 连接 . debug1:identity file /home/Vinoth/.ssh/id_rsa type 1 debug1:key_load_public:没有这样的文件或目录debug1:identity file /home/Vinoth/.ssh/id_rsa-cert type -1 debug1:key_load_public:没有这样的文件或目录debug1:身份文件/home/Vinoth/.ssh/id_dsa类型-1 debug1:key_load_public:没有这样的文件或目录debug1:identity file /home/Vinoth/.ssh/id_dsa-cert type -1 debug1:key_load_public:没有这样的文件或目录debug1:identity file /home/Vinoth/.ssh/id_ecdsa type -1 debug1:key_load_public:没有这样的文件或目录debug1:identity file /home/Vinoth/.ssh/id_ecdsa-cert type -1 debug1:key_load_public:没有这样的文件或目录debug1:identity文件/home/Vinoth/.ssh/id_ed25519类型-1 debug1:key_load_public:没有这样的文件或目录debug1:identity file /home/Vinoth/.ssh/id_ed25519-cert type -1 debug1:为协议2.0 debug1启用兼容模式:本地版本字符串SSH-2.0-OpenSSH_6.8 debug1:远程协议版本2.0,远程软件版本OpenSSH_6 .8 debug1:匹配:OpenSSH_6.8 pat OpenSSH * compat 0x04000000 debug1:SSH2_MSG_KEXINIT发送debug1:SSH2_MSG_KEXINIT收到debug1:kex:server-> client aes128-ctr umac-64-etm@openssh.com none debug1:kex:client->服务器aes128-ctr umac-64-etm@openssh.com无debug1:期望SSH2_MSG_KEX_ECDH_REPLY debug1:服务器主机密钥:ecdsa-sha2-nistp256 SHA256:4Lnpmdki8UuIiQtJyZoc2vxu8x9l PVSN4vykW axilc debug1:主机“localhost”已知且与ECDSA主机密钥匹配 . debug1:找到键/home/Vinoth/.ssh/known_hosts:1 debug1:SSH2_MSG_NEWKEYS发送debug1:期望SSH2_MSG_NEWKEYS debug1:SSH2_MSG_NEWKEYS收到debug1:服务器debug1不允许漫游:SSH2_MSG_SERVICE_REQUEST发送debug1:SSH2_MSG_SERVICE_ACCEPT收到debug1:可以继续的身份验证: publickey,password,keyboard-interacti ve debug1:下一个身份验证方法:publickey debug1:提供RSA公钥:/home/Vinoth/.ssh/id_rsa连接由127.0.0.1关闭