方法一:
#!/bin/bash
#ssh root@192.168.178.23ssh 192.168.178.23 << !
cd /root
bash test.sh
!
exit
方法二:
#!/bin/bash
#slave1 is the hostname or ip
ssh slave1 "cd /usr/;start-controller.sh;start-monitor.sh" &方法一:
#!/bin/bash
#ssh root@192.168.178.23exit
方法二:
#!/bin/bash
#slave1 is the hostname or ip
ssh slave1 "cd /usr/;start-controller.sh;start-monitor.sh" &