mirror of https://github.com/OpenIPC/wiki.git
Merge pull request #183 from lucasdellasantina/SimplifyingFingerprintInScript
Simplifying fingerprint in the script with (-o StrictHostKeyChecking=no)pull/184/head
commit
b384a3a2cb
|
@ -37,11 +37,13 @@ install sshpass
|
|||
```
|
||||
apk add sshpass
|
||||
```
|
||||
|
||||
**Note:** You can test sshpass with
|
||||
|
||||
```
|
||||
sshpass -p '123456' ssh root@192.168.1.29
|
||||
```
|
||||
|
||||
**Note:** run to add the fingerprints, otherwise the script will not work
|
||||
|
||||
Add those lines to configuration.yaml
|
||||
```
|
||||
|
@ -110,35 +112,35 @@ read name
|
|||
|
||||
echo "#!/bin/bash
|
||||
# Conctate al servidor remoto utilizando sshpass y la contraseña
|
||||
sshpass -p '"$password"' ssh "$user"@"$ip" <<EOF
|
||||
sshpass -p '"$password"' ssh -o StrictHostKeyChecking=accept-new "$user"@"$ip" <<EOF
|
||||
# Dentro del servidor remoto, ejecuta el comando t31-kmotor con los argumentos
|
||||
t31-kmotor -d h -r
|
||||
EOF
|
||||
"> "$name"_r.sh
|
||||
echo "#!/bin/bash
|
||||
# Conctate al servidor
|
||||
sshpass -p '"$password"' ssh "$user"@"$ip" <<EOF
|
||||
sshpass -p '"$password"' ssh -o StrictHostKeyChecking=accept-new "$user"@"$ip" <<EOF
|
||||
# Dentro del servidor remoto, ejecuta el comando t31-kmotor
|
||||
t31-kmotor -d g -x -300 -y 0
|
||||
EOF
|
||||
"> "$name"_x_down.sh
|
||||
echo "#!/bin/bash
|
||||
# Conctate al servidor
|
||||
sshpass -p '"$password"' ssh "$user"@"$ip" <<EOF
|
||||
sshpass -p '"$password"' ssh -o StrictHostKeyChecking=accept-new "$user"@"$ip" <<EOF
|
||||
# Dentro del servidor remoto, ejecuta el comando t31-kmotor
|
||||
t31-kmotor -d g -x 300 -y 0
|
||||
EOF
|
||||
"> "$name"_x_up.sh
|
||||
echo "#!/bin/bash
|
||||
# Conctate al servidor
|
||||
sshpass -p '"$password"' ssh "$user"@"$ip" <<EOF
|
||||
sshpass -p '"$password"' ssh -o StrictHostKeyChecking=accept-new "$user"@"$ip" <<EOF
|
||||
# Dentro del servidor remoto, ejecuta el comando t31-kmotor
|
||||
t31-kmotor -d g -x 0 -y -300
|
||||
EOF
|
||||
"> "$name"_y_down.sh
|
||||
echo "#!/bin/bash
|
||||
# Conctate al servidor
|
||||
sshpass -p '"$password"' ssh "$user"@"$ip" <<EOF
|
||||
sshpass -p '"$password"' ssh -o StrictHostKeyChecking=accept-new "$user"@"$ip" <<EOF
|
||||
# Dentro del servidor remoto, ejecuta el comando t31-kmotor
|
||||
t31-kmotor -d g -x 0 -y 300
|
||||
EOF
|
||||
|
|
Loading…
Reference in New Issue