#列出key ls -al ~/.ssh #生成key ssh-keygen -t rsa -b 4096 -C "[email protected]" #判断ssh-agent可用 ssh-agent -s #若执行ssh-add /path/to/xxx.pem是出现这个错误:Could not open a connection to your authentication agent,则先执行如下命令即可: ssh-agent bash #添加key到ssh-agent ssh-add ~/.ssh/id_rsa #复制sshkey clip < ~/.ssh/id_rsa.pub #测试 ssh -T [email protected]
时间: 2024-09-30 00:46:14