ssh 配置免密码登录
1.生成公钥
ssh-keygen -t rsa
2.发送公钥
# 用户@ip
ssh-copy-id ubuntu@10.51.4.3
# 指定pub文件
# ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.24.111.143
Windows中在PowerShell中执行
type $env:USERPROFILE\.ssh\id_rsa.pub | ssh {IP-ADDRESS-OR-FQDN} "cat >> .ssh/authorized_keys"
# ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.24.111.143