github加私钥时的问题
发布时间:2020-12-14 16:39:29 所属栏目:百科 来源:网络整理
导读:table class="text"gt;tbodytr class="li1"gt; td class="ln"pre class="de1"1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 "生成在 /HOME/.ssh/下fdipzone@ubuntu:~$ ssh-keygen -t rsaGenerating public/private
<td class="ln"><pre class="de1">1 | "
生成在 /HOME/.ssh/下
fdipzone@ubuntu:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/fdipzone/.ssh/id_rsa): 这里输入要生成的文件名
Enter passphrase (empty for no passphrase): ? ? ? ? ? ? ? ? ? ? ? 这里输入密码
Enter same passphrase again: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?这里重复输入密码
Your identification has been saved in /home/fdipzone/.ssh/id_rsa.
Your public key has been saved in /home/fdipzone/.ssh/id_rsa.pub.
The key fingerprint is:
f2:76:c3:6b:26:10:14:fc:43:e0:0c:4d:51:c9:a2:b0 fdipzone@ubuntu
The key's randomart image is:
+--[ RSA 2048]----+
| ? ?.+=*.. ? ? ? |
| ?. ?+= + ? ? ? ?|
| ? o oo+ ? ? ? ? |
| ?E . . o ? ? ? ?|
| ? ? ?..S. ? ? ? |
| ? ? ?.o . ? ? ? |
| ? ? ? .o + ? ? ?|
| ? ? ? ...oo ? ? |
| ? ? ? ? +. ? ? ?|
+-----------------+
?
在服务器添加完公钥后报错
sign_and_send_pubkey: signing failed: agent refused operation
这个时候我们只要执行下
eval "$(ssh-agent -s)"
ssh-add [.加路径] ?例如: ssh-add ~/.ssh/vshop_key_rsa
就可以了
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!