您的位置:首页 > 运维架构 > Shell

ubuntu 下非交互式执行远程shell命令

2017-01-06 11:17 423 查看
apt-get install sshpass

sshpass -p **your_password** ssh -o StrictHostKeyChecking=no "root@$ip" "du -sm /home/bone/ext_disk/splunk/var/lib"

参考:
https://www.cyberciti.biz/tips/linux-running-commands-on-a-remote-host.html http://unix.stackexchange.com/questions/38737/ssh-login-with-clear-text-password-as-a-parameter
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: