ssh name@host "ls"
执行多个命令,用 <<标识 来扩起命令
<<标识
#!/bin/bash ssh -tt user@remoteNode > /dev/null 2>&1 << eeooff cd /home touch abcdefg.txt exit eeooff echo done!