Git 根据措辞等),它在较短的时间内拥有更多的观点和投票权,这表明它更受欢迎。请参阅:复制后,两个答案可以合并为一个。pbcopy
Git 根据措辞等),它在较短的时间内拥有更多的观点和投票权,这表明它更受欢迎。请参阅:复制后,两个答案可以合并为一个。pbcopy,git,ssh,rsa,Git,Ssh,Rsa,根据措辞等),它在较短的时间内拥有更多的观点和投票权,这表明它更受欢迎。请参阅:复制后,两个答案可以合并为一个。pbcopy
根据措辞等),它在较短的时间内拥有更多的观点和投票权,这表明它更受欢迎。请参阅:复制后,两个答案可以合并为一个。
pbcopy<~/.ssh/id\u rsa.pub
对我有用!对于那些没有pbcopy
工作的用户,请选中此sudo apt get install xclip-y
。sudo apt get install-y xclip
后跟alias pbcopy=“xclip-sel clip”
然后pbcopy<~/.ssh/id\u rsa.pub
或者干脆xclip-selection剪贴板<~/.ssh/id\u rsa.pub
这对于您事先不知道密钥路径的情况非常有用。它并不总是在~/.ssh/
中。试用过,可以在Mac、Win10(git bash)和Ubuntu上使用。使用ssh add-L
是更好的选择,因为不是每个ssh密钥都是位于~/.ssh
文件夹中的RSA密钥。我更喜欢使用我的PGP密钥进行身份验证,因此我根本没有~/.ssh/id\u rsa.pub
文件。这是我最喜欢的方式。即使我在终端或finder上找不到该文件,但使用文本编辑器打开该文件仍然有效。。。谢谢
$ pbcopy < ~/.ssh/id_rsa.pub
# Copies the contents of the id_rsa.pub file to your clipboard
~/.ssh$ gedit some_name.pub
cat .ssh/id_rsa.pub |pbcopy
notepad ~/.ssh/id_rsa.pub
pbcopy < ~/.ssh/id_rsa.pub
ssh-agent sh -c 'ssh-add; ssh-add -l'
ssh-agent sh -c 'ssh-add; ssh-add -L'
# sudo su
# cd /home/user/.ssh
.ssh# gedit id_rsa.pub
cat ~/.ssh/id_<key-type-here>.pub | clip
cat ~/.ssh/id_ed25519.pub | clip
function Copy-SSHKey {
Get-Content ~/.ssh/id_ed25519.pub | clip
}
Set_Alias -Name sshkey -Value Copy-SSHKey
/Users/john/.ssh
cat ~/.ssh/id_rsa.pub | pbcopy
ssh-keygen -o -t rsa -b 4096 -C "email@example.com"
cat ~/.ssh/id_rsa.pub
cat ~/.ssh/id_dsa.pub
ssh-keygen -y
ssh-keygen -y -f path/to/private_key
$ cat ~/.ssh/id_rsa.pub