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

相关文章:

  • 2021-11-12
  • 2021-11-22
  • 2021-11-22
  • 2021-10-19
  • 2021-10-19
猜你喜欢
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
相关资源
相似解决方案