首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Hetzner错误:拒绝权限(公开密钥)

Hetzner错误:拒绝权限(公开密钥)
EN

Stack Overflow用户
提问于 2021-08-17 01:55:01
回答 1查看 942关注 0票数 1

我正试图在hetzner部署上从github获得rails get的回购!但是在ssh中显示了这个结果!

代码语言:javascript
复制
ssh -vT git@github.com
OpenSSH_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n  7 Dec 2017
debug1: Reading configuration data /home/dc/.ssh/config
debug1: /home/dc/.ssh/config line 1: Applying options for github.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to github.com [140.82.121.3] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/dc~/.ssh/id_rsa.pub type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/dc~/.ssh/id_rsa.pub-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.5
debug1: Remote protocol version 2.0, remote software version babeld-322814ef
debug1: no match: babeld-322814ef
debug1: Authenticating to github.com:22 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: rsa-sha2-512
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: ssh-rsa SHA256:XXXXXxxxxxXXXXXXXXXXXX
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in /home/dc/.ssh/known_hosts:16
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-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
git@github.com: Permission denied (publickey).

自从更改/etc/ssh/sshd_ PasswordAuthentication _config后,我已经尝试了一切

在known_hosts上添加keygen,authorized_keys在服务器和github上添加keygen

创建一个ed25519 keygen并尝试它

一切都是静止的

github给我git@github.com:拒绝许可

. .ssh/config文件

代码语言:javascript
复制
Host github.com
User git
Hostname github.com
PreferredAuthentications publickey
Port 22
IdentityFile /home/dc~/.ssh/id_rsa.pub
EN

回答 1

Stack Overflow用户

发布于 2021-08-17 07:52:36

hetzner专用服务器中,您需要首先检查的是:

代码语言:javascript
复制
ssh -Tv git@github.com

只要您没有看到“欢迎”消息,任何其他进程(假设它是使用该服务器上的同一个用户帐户执行的)都无法使用SSH从GitHub中获取。

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

https://stackoverflow.com/questions/68810831

复制
相关文章

相似问题

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