其他分享
首页 > 其他分享> > ssh免交互

ssh免交互

作者:互联网

sshpass -p the_password ssh -o StrictHostKeyChecking=no root@domainname_or_ip remote_command  #远程执行命令

scp  -o StrictHostKeyChecking=no  远程复制

sshpass -p XXX ssh-copy-id root@XXX 

 

写入配置文件:

echo 'StrictHostKeyChecking=no' >> /etc/ssh/ssh_config

systemctl restart sshd

 

标签:no,root,XXX,ssh,sshpass,StrictHostKeyChecking,交互
来源: https://www.cnblogs.com/santia-god/p/16386777.html