sshpass -p "passwd" ssh root@192.168.0.56 "ls" 其中sshpass 如果没安装则需要安装。 参考:https://www.cnblogs.com/gaoxing/p/4311746.html