ssh连接使用cygwin

我正尝试使用cygwin + ssh连接远程的linux服务器,但validation失败,没有明显的原因。 我已经成功地build立了另一个连接github,我也遵循了同样的过程,这就是为什么我停在这里

$ ssh -v finxxx@xxx.79.xxx.29 OpenSSH_6.0p1, OpenSSL 1.0.1c 10 May 2012 debug1: Connecting to xxx.79.xxx.29 [xxx.79.xxx.29] port 22. debug1: Connection established. debug1: identity file /home/xxxtta/.ssh/id_rsa type -1 debug1: identity file /home/xxxtta/.ssh/id_rsa-cert type -1 debug1: identity file /home/xxxtta/.ssh/id_dsa type 2 debug1: identity file /home/xxxtta/.ssh/id_dsa-cert type -1 debug1: identity file /home/xxxtta/.ssh/id_ecdsa type -1 debug1: identity file /home/xxxtta/.ssh/id_ecdsa-cert type -1 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3p1 Debian-3ubuntu7 debug1: match: OpenSSH_5.3p1 Debian-3ubuntu7 pat OpenSSH_5* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.0 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr hmac-md5 none debug1: kex: client->server aes128-ctr hmac-md5 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Server host key: RSA c7:b2:f1:f9:76:cd:24:5a:80:91:4b:e5:ac:7e:e1:ee debug1: Host 'xxx.79.xxx.29' is known and matches the RSA host key. debug1: Found key in /home/xxxtta/.ssh/known_hosts:1 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Trying private key: /home/xxxtta/.ssh/id_rsa debug1: Offering DSA public key: /home/xxxtta/.ssh/id_dsa debug1: Authentications that can continue: publickey debug1: Trying private key: /home/xxxtta/.ssh/id_ecdsa debug1: No more authentication methods to try. Permission denied (publickey). 

我已经制定了标准的东西,但是我解决不了这个问题。 这些是我用来生成私钥/公钥的命令。 然后我将公钥复制到服务器上

 $ ssh-keygen -t dsa Generating public/private dsa key pair. Enter file in which to save the key (/home/xxxtta/.ssh/id_dsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/xxxtta/.ssh/id_dsa. Your public key has been saved in /home/xxxtta/.ssh/id_dsa.pub 

感谢您的帮助

编辑:我已经使用MINGW相同的程序,它的工作原理(我可以连接)。 cygwin在我的系统中肯定会出错

问题可能在于用户名。 如果远程登录用户名是区分大小写的。 您必须准确写出用户名在Windows中的定义。

将id_dsa.pub复制到您的远程服务器。

 # scp .ssh/id_dsa.pub dude@remotemachine 

在远程服务器上:

 # cat id_dsa.pub >> ~/.ssh/authorized_keys 

您可以尝试使用-vvv而不是-v来增加冗长度。
另外,请检查文件权限是否设置正确。 请参阅将公钥添加到〜/ .ssh / authorized_keys不会自动登录到我