我正在尝试生成 RSA 密钥以使用 ssh 在 azure 中访问 somw git 存储库。
拥有 Ubuntu22.04
和 openssl 版本OpenSSL 3.0.2 15 Mar 2022
,
我生成 RSA 密钥,如下所示:
$ ssh-keygen -t rsa -b 4096
Generating public/private rsa key pair.
Enter file in which to save the key (/home/me/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/me/.ssh/id_rsa
Your public key has been saved in /home/me/.ssh/id_rsa.pub
The key fingerprint is:
...
The keys randomart image is:
+---[RSA 4096]----+
....
....
+----[SHA256]-----+
但是当我这样做时
$ cat ~/.ssh/id_rsa
,我看到我的密钥文件以
-----BEGIN OPENSSH PRIVATE KEY-----
应该BEGIN RSA PRIVATE KEY
改为吗?有什么区别?