1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/borg_ynh.git synced 2024-09-03 18:16:05 +02:00

[ehn] Test hostkey presence a more reliable way

This commit is contained in:
JocelynDelalande 2019-01-13 00:47:53 +01:00 committed by ljf (zamentur)
parent d2ce705a7e
commit dc5cad75cf

View file

@ -3,7 +3,7 @@
set -e
BORG_PASSPHRASE="{{ passphrase }}"
if grep "{{ server }}" ~/.ssh/known_hosts; then
if ssh-keygen -F "{{ server }}" >/dev/null ; then
BORG_RSH="ssh -i /root/.ssh/id_{{ app }}_ed25519 -oStrictHostKeyChecking=yes "
else
BORG_RSH="ssh -i /root/.ssh/id_{{ app }}_ed25519 -oStrictHostKeyChecking=no "