經過不懈的搜索終於找到ssh遠程執行命令使用明文密碼使用sshpass.
例子:
sshpass -p "sequoiadb" ssh root@localhost "ls /"
sshpass在centos無法直接安裝
cd /etc/yum.repos.d/ wget http://download.opensuse.org/repositories/home:Strahlex/CentOS_CentOS-6/home:Strahlex.repo yum install sshpass