免密登录linux

119 阅读1分钟

生成秘钥

ssh-keygen -t rsa -C "your_email@example.com"

上传到远程服务器

ssh-copy-id root@xxx.xx.xxx.xx

登录

ssh root@xxx.xx.xxx.xx