-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.sh
14 lines (14 loc) · 814 Bytes
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
mkdir -p /root/.ssh
cp /root/ssh-key/id_rsa* /root/.ssh
echo "" >> /root/.ssh/id_rsa
echo "" >> /root/.ssh/id_rsa.pub
chmod 400 /root/.ssh/id_rsa*
if [ "$1" = "stats" ]; then
ssh -o StrictHostKeyChecking=no -o PubkeyAcceptedKeyTypes=ssh-rsa -o PasswordAuthentication=no $3@$2 'bash -s' < /opt/usg-blacklist/stats.sh
elif [ "$4" = "true" ]; then
ssh -o StrictHostKeyChecking=no -o PubkeyAcceptedKeyTypes=ssh-rsa -o PasswordAuthentication=no $3@$2 'bash -s' < /opt/usg-blacklist/blacklist.sh
ssh -o StrictHostKeyChecking=no -o PubkeyAcceptedKeyTypes=ssh-rsa -o PasswordAuthentication=no $3@$2 'bash -s' < /opt/usg-blacklist/blacklist6.sh
else
ssh -o StrictHostKeyChecking=no -o PubkeyAcceptedKeyTypes=ssh-rsa -o PasswordAuthentication=no $3@$2 'bash -s' < /opt/usg-blacklist/blacklist.sh
fi