免密登陆服务器

免密登陆服务器

客户端生成公私钥

ssh-keygen

上传公钥到服务器

假设服务器用户名为root,ip为192.168.x.x

ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.x.x
posted @ 2021-12-20 11:07  MisterJunwei  阅读(42)  评论(0编辑  收藏  举报