YunoHost-Apps / borgserver_ynh

Borg server package for YunoHost
https://www.borgbackup.org/
GNU Affero General Public License v3.0
8 stars 4 forks source link

Use of a different SSH port. #55

Closed SimonLefort closed 2 years ago

SimonLefort commented 2 years ago

Describe the bug

If I change the default SSH port, Borg didn't work anymore (pretty normal). I change in the configuration file but I am not sure it's the best way to correct it.

Context

Steps to reproduce

Change the SSH default port (22) on the server who hold the backup.

Expected behavior

I change the configuration in the borg app configuration file :

# vim /etc/yunohost/hooks.d/backup_method/05-borg_app
if ssh-keygen -F "myserver.com" >/dev/null ; then
    #BORG_RSH="ssh -i /root/.ssh/id_${app}_ed25519 -oStrictHostKeyChecking=yes "
    BORG_RSH="ssh -i /root/.ssh/id_${app}_ed25519 -p 1234 -oStrictHostKeyChecking=yes "
else
    #BORG_RSH="ssh -i /root/.ssh/id_${app}_ed25519 -oStrictHostKeyChecking=no "
    BORG_RSH="ssh -i /root/.ssh/id_${app}_ed25519 -p 1234 -oStrictHostKeyChecking=no "
fi

I works but I am not sure it's the best place to write the change. What do you think ?

Logs

Before I add the port in _/etc/yunohost/hooks.d/backup_method/05-borgapp :

# tail -n 100 /var/log/backup_borg.err
[2021-12-19_00:06:40] Remote: ssh: connect to host myserver.com port 22: Connection refused
[2021-12-19_00:06:40] Connection closed by remote host. Is borg working on the server?

Thank you for reading.

zamentur commented 2 years ago

I close this bug cause the borgserver app is not concerned by that (borg_ynh partially yes)