1.打開終端,進入ssh文件 cd ~/.ssh 2.輸入命令生成 sshkey ssh-keygen -t rsa -C "xxxxx@xxx.com" 3.查看生成的公鑰 第一種方式: cat ~/.ssh/id_rsa.pub