centos7 ssh免密设置
2020-04-05 本文已影响0人
淼哥1986
从ip1机器发送到ip2免密
- ip1机器执行
cd /root/.ssh
ssh-keygen -t rsa -b 4096
ssh-copy-id -i /root/.ssh/id_rsa.pub root@ip2
- 测试
ssh root@ip2
scp something root@ip2:/opt/app
从ip1机器发送到ip2免密
cd /root/.ssh
ssh-keygen -t rsa -b 4096
ssh-copy-id -i /root/.ssh/id_rsa.pub root@ip2
ssh root@ip2
scp something root@ip2:/opt/app