其他问题 我用 walle 系统,去 ssh 链接 coding 项目,ssh 连不上?

王长江 · 2017年07月05日 · 最后由 王长江 回复于 2017年07月05日 · 242 次阅读

为什么 图片

共收到 23 条回复

[root@localhost ~]# ssh git@git.coding.net
Warning: Permanently added the RSA host key for IP address ‘123.59.85.91’ to the list of known hosts.
Permission denied (publickey).

我已经ssh-keygen -t rsa -C “aaaaaaa@qq.com”

ssh -vT git@git.coding.net
超级小胖 回复

[root@localhost ~]# ssh -vT git@git.coding.net OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to git.coding.net [123.59.83.81] port 22. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: identity file /root/.ssh/identity type -1 debug1: identity file /root/.ssh/identity-cert type -1 debug1: identity file /root/.ssh/id_rsa type 1 debug1: identity file /root/.ssh/id_rsa-cert type -1 debug1: identity file /root/.ssh/id_dsa type -1 debug1: identity file /root/.ssh/id_dsa-cert type -1 debug1: identity file /root/.ssh/id_ecdsa type -1 debug1: identity file /root/.ssh/id_ecdsa-cert type -1 debug1: Remote protocol version 2.0, remote software version Go debug1: no match: Go debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.3 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr hmac-sha1 none debug1: kex: client->server aes128-ctr hmac-sha1 none debug1: sending SSH2_MSG_KEXDH_INIT debug1: expecting SSH2_MSG_KEXDH_REPLY debug1: Host ‘git.coding.net’ is known and matches the RSA host key. debug1: Found key in /root/.ssh/known_hosts:2 Warning: Permanently added the RSA host key for IP address ‘123.59.83.81’ to the list of known hosts. debug1: ssh_rsa_verify: signature correct 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 debug1: Next authentication method: publickey debug1: Trying private key: /root/.ssh/identity debug1: Offering public key: /root/.ssh/id_rsa debug1: Authentications that can continue: publickey debug1: Trying private key: /root/.ssh/id_dsa debug1: Trying private key: /root/.ssh/id_ecdsa debug1: No more authentication methods to try. Permission denied (publickey).

您好,您已经生成了 ssh-key,那么有把 ssh-key 加入到您账户下边么?

李鹏龙 回复

我填了啊,你能截个图,在哪里填吗?

李鹏龙 回复

你后台能帮我看一下吗?

请检查一下,是否有添加公钥

您好,您可能是因为切换到了 root 用户,导致 ssh 认证失败,建议您切回普通用户模式再试试

wangziying 回复

[root@localhost ~]# su www [www@localhost root]$ ssh -T git@git.coding.net Warning: Permanently added the RSA host key for IP address ‘123.59.85.71’ to the list of known hosts. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0755 for ‘/home/www/.ssh/id_rsa’ are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. bad permissions: ignore key: /home/www/.ssh/id_rsa Permission denied (publickey).

wangziying 回复

@王长江 您本地的文件权限设置有问题,建议使用这个命令 chmod 400 ~/.ssh/id_rsa 修复

wangziying 回复

@wangziying [www@localhost .ssh]$ ssh -T git@git.coding.net Warning: Permanently added the RSA host key for IP address ‘123.59.85.192’ to the list of known hosts. Coding.net Tips : [Hello! You’ve connected to Coding.net via SSH. This is a deploy key.]

wangziying 回复

这是连上了吧?

wangziying 回复

@王长江 您出现上面的报错提示是因为您本地文件权限设置有问题。建议您用楼上的命令修复

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
相关话题