首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >使用SSH Keygen无法连接到Windows 10 GIT上的服务器

使用SSH Keygen无法连接到Windows 10 GIT上的服务器
EN

Stack Overflow用户
提问于 2016-08-11 01:28:31
回答 1查看 2.2K关注 0票数 0

下面是我的教程。

https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2

它是在Windows 10 C:\Users\<user name>\.ssh上生成的文件

我用GIT来生成文件。

代码语言:javascript
复制
 ~/Desktop
$ PermitRootLogin without-password
bash: PermitRootLogin: command not found

$ ssh a@b.com
a@b.com's password:
Permission denied, please try again.

我已经使用.ppk生成了puttygen.exe文件。

仍然无法连接到服务器。

通过做ssh -Tv a@b.com

它将给出以下答复

代码语言:javascript
复制
OpenSSH_7.1p2, OpenSSL 1.0.2h  3 May 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to a@b.com [XXX.XXX.XXX.XX] port 22.
debug1: Connection established.
debug1: identity file /c/Users/XUser/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/XUser/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/XUser/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/XUser/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/XUser/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/XUser/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/XUser/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/XUser/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6 pat OpenSSH_6.6.1* compat 0x04000000
debug1: Authenticating to a@b.com:22 as 'XUser'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client chacha20-poly1305@openssh.com <implicit> none
debug1: kex: client->server chacha20-poly1305@openssh.com <implicit> none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:WrjAO7ldoJ3vjYENd6v7JvxXkbquvvom16RYGKeRO70
debug1: Host 'a@b.com' is known and matches the ECDSA host key.
debug1: Found key in /c/Users/XUser/.ssh/known_hosts:2
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /c/Users/XUser/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /c/Users/XUser/.ssh/id_dsa
debug1: Trying private key: /c/Users/XUser/.ssh/id_ecdsa
debug1: Trying private key: /c/Users/XUser/.ssh/id_ed25519
debug1: Next authentication method: password
XUser@a@b.com's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
XUser@a@b.com's password:
EN

回答 1

Stack Overflow用户

发布于 2016-08-11 07:37:16

如果你有

  • 您的公钥:C:\Users\<user name>\.ssh\id_rsa.pub
  • 您的私钥:C:\Users\<user name>\.ssh\id_rsa

复制您的公钥(见"如何在DigitalOcean液滴中使用SSH键")

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38885920

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档