标签: rsa

为 SSH 使用 PGP 密钥

我使用 4096 字节的 RSA PGP 密钥;由于 SSH 也使用 RSA 标准,是否有可能将 PGP 密钥用作 SSH 密钥而无需在服务器上安装其他软件(并且尽可能少地在客户端上安装)?

ssh rsa gpg pgp

19
推荐指数
4
解决办法
2万
查看次数

如何将 RSA SSH 密钥作为 _primary_ 私钥导入 GPG?

我目前有一个 SSH 密钥,我已经使用了一段时间,我想开始使用带有新密钥环的 GnuPG。但是,鉴于我已经使用我的密钥多年,我仍然希望在 GPG 中使用该密钥作为主/主键。我已经尝试通过这些说明导入密钥。

但是,我最终得到了被认为是“子密钥”的东西。此外,如果我尝试在不创建标准 GPG 密钥的情况下导入它,GPG 甚至看不到这个子密钥。(我假设子密钥需要先由主密钥签名。)

如何使用此密钥作为 secring.gpg 中的主密钥?

rsa gpg openssl private-key ssh-keys

19
推荐指数
2
解决办法
2万
查看次数

尽管接受了密钥,但 SSH 连接要求输入密码

即使我的 SSH 密钥看起来已被接受,我也收到了输入密码的提示。据我所知,下面日志中的“服务器接受密钥:pkalg ssh-rsa blen 277”行表示我的密钥已被接受。

以下是调试日志:

debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/sam/.ssh/id_rsa
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug2: input_userauth_pk_ok: fp <<HASH REDACTED>>
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: /home/sam/.ssh/id_dsa
debug1: Trying private key: /home/sam/.ssh/id_ecdsa
debug2: we did not send a packet, disable method
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for …
Run Code Online (Sandbox Code Playgroud)

ssh rsa

15
推荐指数
3
解决办法
4万
查看次数

如何设置自己的全功能证书颁发机构?

我想设置一个证书颁发机构,然后我可以将其导入到公司的所有浏览器和系统中,以便在使用 HTTPS 或 SSL 时摆脱所有那些讨厌的客户端警告。

security linux rsa openssl ssl-certificate

14
推荐指数
2
解决办法
2万
查看次数

SSH-RSA 公钥中的 User@host

经常出现在公共 ssh-rsa 密钥末尾的 user@host 扮演什么角色?有必要吗?if 在身份验证中是否有任何用途,或者它只是记录谁以及在何处创建密钥以提供信息(对于人类读者)?

rsa public-key ssh-keys

14
推荐指数
1
解决办法
6880
查看次数

即使我知道密码,也无法解密私钥

我认为我的问题归结为密钥有问题,但我不能只是解密它,以便进一步调查,而不对其进行解析。但我不确定。

我正在尝试使用标准方法:

openssl rsa -in ./id_rsa -out ./id_rsa.decrypted
Run Code Online (Sandbox Code Playgroud)

我想我知道密码,因为当我输入错误时,我得到:

Enter pass phrase for ./id_rsa:
unable to load Private Key
140256774473360:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:evp_enc.c:544:
140256774473360:error:0906A065:PEM routines:PEM_do_header:bad decrypt:pem_lib.c:483
Run Code Online (Sandbox Code Playgroud)

坏解密”很清楚。现在,当我输入看似不错的密码时,我会回来:

Enter pass phrase for ./id_rsa:
unable to load Private Key
139662870623888:error:0D07207B:asn1 encoding routines:ASN1_get_object:header too long:asn1_lib.c:153:
139662870623888:error:0D068066:asn1 encoding routines:ASN1_CHECK_TLEN:bad object header:tasn_dec.c:1314:
139662870623888:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:381:Type=RSA
139662870623888:error:04093004:rsa routines:OLD_RSA_PRIV_DECODE:RSA lib:rsa_ameth.c:115:
139662870623888:error:0D07207B:asn1 encoding routines:ASN1_get_object:header too long:asn1_lib.c:153:
139662870623888:error:0D068066:asn1 encoding routines:ASN1_CHECK_TLEN:bad object header:tasn_dec.c:1314:
139662870623888:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:381:Type=PKCS8_PRIV_KEY_INFO
139662870623888:error:0907B00D:PEM routines:PEM_READ_BIO_PRIVATEKEY:ASN1 lib:pem_pkey.c:132:
Run Code Online (Sandbox Code Playgroud)

它也无法加载密钥,但现在它在 asn1 解析器上失败了,与密码无关。

我可以以某种方式获得未加密版本的密钥并使用其他工具查看有什么问题吗?

我看过一些帖子,说有些东西发生了变化,看似好的密钥的可能原因无法解析,但它们都适用于未加密的版本。但他们唯一的方法是我看到的 …

rsa openssl passphrase

12
推荐指数
1
解决办法
5万
查看次数

SSH 密钥:ed25519 与 RSA 性能揭秘

据称,ed25519 密钥在安全性和性能方面优于 RSA。就安全性而言,我知道 4096 位 RSA 密钥在可预见的未来实际上是牢不可破的,所以我不会问这个

我想了解的是性能差异(就速度而言)。当人们声称 ed25519 密钥更快时,这意味着什么?我是从用户的角度来问的。我考虑了几种可能性:

  • 使用 ed25519 密钥登录服务器速度更快,但之后服务器与客户端的通信速度相同。
  • 使用 ed25519 密钥,初始登录和服务器-客户端通信速度更快。
  • 如果从服务器复制文件或将文件复制到服务器,传输速度有什么不同吗?
  • 如果我通过服务器建立 ssh 隧道,我会注意到任何速度差异吗?

是哪一个?他们全部?他们都不是?

因此,我不是在问它们之间的数学差异,也不是在询问破解其加密的算法复杂性,也不是在问安全保证。我问的是现实世界用户应用程序中的速度。

performance ssh rsa network-speed ssh-keys

11
推荐指数
1
解决办法
1万
查看次数

sshd 因“不支持的密钥交换算法”错误而关闭

sshd

$ /usr/sbin/sshd -f testconfig -p 22025 -d

debug1: sshd version OpenSSH_5.2p1
debug1: private host key: #0 type 0 RSA1
debug1: read PEM private key done: type RSA
debug1: private host key: #1 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #2 type 2 DSA
debug1: setgroups() failed: Operation not permitted
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-f'
debug1: rexec_argv[2]='testconfig'
debug1: rexec_argv[3]='-p'
debug1: rexec_argv[4]='22025'
debug1: rexec_argv[5]='-d'
debug1: Bind to port 22025 on 127.0.0.1.
Server listening on …
Run Code Online (Sandbox Code Playgroud)

linux ssh rsa

10
推荐指数
2
解决办法
3万
查看次数

OpenSSH : 基于密钥的授权,最大密钥长度

我在 Windows 上使用 Putty 和基于密钥的身份验证来访问我的一些服务器。

它使用 ~3700 位密钥完全正常,但使用 ~17000 位密钥,它会在客户端思考 20 秒,然后只是说“拒绝访问”并要求输入密码。

OpenSSH 中是否有用于基于密钥的身份验证的密钥长度限制或超时?

我知道使用这么大的键没有多少实际意义,尤其是在查看这 20 秒的计算时,只是试图解决我面临的任何问题:-)...

ssh authentication rsa

10
推荐指数
2
解决办法
9208
查看次数

ssh: id_rsa 不起作用,但如果我重命名它,它会起作用

我的 ~/.ssh 文件夹中有这个 id_rsa。但它只是不进行身份验证。如果我复制它并将其重命名为 id_rsa 以外的任何名称,则它可以工作。

[qfan@mycomputer .ssh]$ ls -al id_rsa id_rsa_good
-rw------- 1 qfan qfan 1766 Dec  3 18:35 id_rsa
-rw------- 1 qfan qfan 1766 Nov 20 19:43 id_rsa_good
[qfan@mycomputer .ssh]$ sha1sum id_rsa id_rsa_good
8cc7f68170038b184bba0541be7d105bb36f7d11  id_rsa
8cc7f68170038b184bba0541be7d105bb36f7d11  id_rsa_good
[qfan@mycomputer .ssh]$ ssh localhost -i id_rsa
qfan@localhost's password: 

[qfan@mycomputer .ssh]$ ssh localhost -i id_rsa_good
Enter passphrase for key 'id_rsa_good': 
Last login: Tue Dec  3 18:46:46 2013 from 127.0.0.1
[qfan@mycomputer ~]$ exit
logout
Connection to localhost closed.
Run Code Online (Sandbox Code Playgroud)

请注意,“ssh localhost -i id_rsa”失败并且 ssh …

ssh login rsa

10
推荐指数
1
解决办法
6480
查看次数