示例:
./sshpass -p ‘123456’ ssh -o StrictHostKeyChecking=no root@192.168.1.15
./sshpass -p ‘123456’ scp -o StrictHostKeyChecking=no /root/abc.sh 192.168.1.15:/root
-p:指定ssh的密码
-o StrictHostKeyChecking=no 避免第一次登录出现公钥检查
2023-12-19 16:09:51
示例:
./sshpass -p ‘123456’ ssh -o StrictHostKeyChecking=no root@192.168.1.15
./sshpass -p ‘123456’ scp -o StrictHostKeyChecking=no /root/abc.sh 192.168.1.15:/root
-p:指定ssh的密码
-o StrictHostKeyChecking=no 避免第一次登录出现公钥检查