Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

1. 生成公钥

ssh-keygen -t rsa -C "xxxxx@xxxxx.com"  
或
ssh-keygen -t ed25519 -C "xxxxx@xxxxx.com"  

两种操作一样只是生成密钥的加密方式不同

2. 查看公钥

cat ~/.ssh/id_rsa.pub
PS C:\Users\sss> cat ~/.ssh/id_ed25519.pub
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL7iL5mVSeEYnMJvNhpTxZR/rv2WApe2+IkfL4iXlfCu xxxxx@xxx.com