shell中使用ssh
ssh root@172.28.38.73 <<remotessh ps -ef|grep mongod | grep -v grep remotessh
shell中切换root权限
#!/bin/bash sudo su <<EOF mkdir document; exit; EOF