Mac 获取,查看 SSH

mac下生成密钥ssh

  1. 查看本地是否存在SSH-Key
ls -al ~/.ssh

2.生成新的SSH Keycode

ssh-keygen -t rsa -C"任意字符串"

一路敲回车
3.生成并添加SSH Key字符串

ssh-add ~/.ssh/id\_rsa

4.查看SSH Keyrsa

cat /Users/电脑用户名/.ssh/id\_rsa.pub