问题原文
原帖链接 · 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.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
