直到sshpass为止,shell脚本都会执行,并且不会继续执行其余的脚本

时间:2019-03-06 08:32:18

标签: linux shell sshpass

我在Linux中执行以下cmd:

 curl http://10.10.10.10/tools/curlbash.sh |bash

输出为:

Hello
bash: line 2: sf: command not found
world

Authorized users only. All activities may be monitored and reported.

curlbash.sh的内容是:

echo "Hello"
sf
echo "world"
sshpass -p Root ssh -o StrictHostKeyChecking=no root@10.10.10.10 "date > /home/date.txt"
echo "end"
date

为什么不能执行“ sshpass”行之后的命令?

0 个答案:

没有答案