大网数据广告活动
服务器运维问答

SSH looking for id_rsa-cert get key_load_public error

· 52CE 我爱测

1) My ~/.ssh folder has the permission: drwx------. 2 user user 4.0K Aug 19 15:39 .ssh 2) I run ssh-keygen -t rsa and get the defaults files id_rsa and id_rsa.pub. 3) I copy/paste my id_rsa.pub key to GitHub SSH Keys 4) When tryi…

问题原文

原帖链接 · yuriploc · CC BY-SA 3.0

1) My ~/.ssh folder has the permission: drwx------. 2 user user 4.0K Aug 19 15:39 .ssh

2) I run ssh-keygen -t rsa and get the defaults files id_rsa and id_rsa.pub.

3) I copy/paste my id_rsa.pub key to GitHub SSH Keys

4) When trying to connect via ssh -i id_rsa -vT [email omitted] I get the following:

OpenSSH_7.5p1, OpenSSL 1.1.0f-fips 25 May 2017 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config debug1: /etc/ssh/ssh_config.d/05-redhat.conf line 8: Applying options for * debug1: Connecting to github.com [192.30.253.113] port 22. debug1: Connection established. debug1: identity file id_rsa type 1 debug1: key_load_public: No such file or directory debug1: identity file id_rsa-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.5

I'm in doubt about how to generate the id_rsa-cert file.

I tried

openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa-cert

and

openssl req -x509 -key ~/.ssh/id_rsa -nodes -days 9999 -newkey rsa:2048 -out id_rsa-cert

And it didn't work. Any tips?

已采纳解答

原帖链接 · Jakuje · CC BY-SA 3.0

I'm in doubt about how to generate the id_rsa-cert file.

You don't need it and certainly not for github access. The client is looking for a file named that way, but it does not mean that it is needed for normal SSH key authentication. For that, normal RSA key as you provided is enough.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-08-19)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。