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
|
apk add sshpass
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Note:** You can test sshpass with
|
||||||
|
|
||||||
```
|
```
|
||||||
sshpass -p '123456' ssh root@192.168.1.29
|
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
|
Add those lines to configuration.yaml
|
||||||
```
|
```
|
||||||
|
@ -110,35 +112,35 @@ read name
|
||||||
|
|
||||||
echo "#!/bin/bash
|
echo "#!/bin/bash
|
||||||
# Conctate al servidor remoto utilizando sshpass y la contraseña
|
# 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
|
# Dentro del servidor remoto, ejecuta el comando t31-kmotor con los argumentos
|
||||||
t31-kmotor -d h -r
|
t31-kmotor -d h -r
|
||||||
EOF
|
EOF
|
||||||
"> "$name"_r.sh
|
"> "$name"_r.sh
|
||||||
echo "#!/bin/bash
|
echo "#!/bin/bash
|
||||||
# Conctate al servidor
|
# 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
|
# Dentro del servidor remoto, ejecuta el comando t31-kmotor
|
||||||
t31-kmotor -d g -x -300 -y 0
|
t31-kmotor -d g -x -300 -y 0
|
||||||
EOF
|
EOF
|
||||||
"> "$name"_x_down.sh
|
"> "$name"_x_down.sh
|
||||||
echo "#!/bin/bash
|
echo "#!/bin/bash
|
||||||
# Conctate al servidor
|
# 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
|
# Dentro del servidor remoto, ejecuta el comando t31-kmotor
|
||||||
t31-kmotor -d g -x 300 -y 0
|
t31-kmotor -d g -x 300 -y 0
|
||||||
EOF
|
EOF
|
||||||
"> "$name"_x_up.sh
|
"> "$name"_x_up.sh
|
||||||
echo "#!/bin/bash
|
echo "#!/bin/bash
|
||||||
# Conctate al servidor
|
# 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
|
# Dentro del servidor remoto, ejecuta el comando t31-kmotor
|
||||||
t31-kmotor -d g -x 0 -y -300
|
t31-kmotor -d g -x 0 -y -300
|
||||||
EOF
|
EOF
|
||||||
"> "$name"_y_down.sh
|
"> "$name"_y_down.sh
|
||||||
echo "#!/bin/bash
|
echo "#!/bin/bash
|
||||||
# Conctate al servidor
|
# 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
|
# Dentro del servidor remoto, ejecuta el comando t31-kmotor
|
||||||
t31-kmotor -d g -x 0 -y 300
|
t31-kmotor -d g -x 0 -y 300
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Reference in New Issue