NethServer Version: 7.9
I have been using a SFTP backup to another server (an additional simple hosting package from my provider, not a different Nethserver) for a year now.
Since a few days this backup fails.
Pre backup scripts status: SUCCESS
subprocess ssh: ssh: connect to host 11.222.33.44 port 22: Connection timed out
Fatal: create repository at sftp:ftpuser@11.222.33.44 :/bak/ns-serv01 failed: unable to start the sftp session, error: EOF
I did not change the credentials, but a few days earlier the provider changed the certificate.
Hello MArkus, thank you for your offer. I may come back to this.
In the meantime …
I have deleted the backup job completely and created a new rsync one. At least the configuration passesd the check and the job could be saved. Shortly after the start, however, the abort.
I have deleted the backup job completely and created a new restic one. Now the job runs.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: remote command not found (code 127) at io.c(226) [sender=3.1.2]
rsync_tmbackup: [ERROR] Rsync reported an error. Run this command for more details: grep -E ‘rsync:|rsync error:’ ‘/root/.rsync_tmbackup/2021-09-28-153518.log’
Connection to remote host uses a specific public key. A password is needed only once to copy the
public key to the remote host. SSH client configuration is added to /etc/ssh/sshd_config .
I guess the key changed and the connection wasn’t trusted anymore. After new setup the SSH connection was renewed and now it works again…
On the backup host you should find the authorized keys ssh configuration of the sftpuser in ~/.ssh/authorized_keys. In this file you may remove the line with sftpuser@yournethserver at the end.
Then reenter the password in the backup UI and start the backup once.
It works when you can login via ssh from your Nethserver to you backup host as sftpuser without password.
If a backup immediately stops, it could also be permissions issue, on the backup host you need to set write permissions for sftpuser for the SFTP directory.
Unfortunately, this curious behavior occurred again.
I cleared the ~/.ssh/authorized_keys completely. The reentering the password on backup GUI didn’t help.
write permissions for sftpuser for the SFTP directory are set correctly, unchanged.
The rsync log file is not valid, because I used finally restic backup. A restic log file I cannot find.
The strange thing is, that it worked until now without any problems, but now there is no connection, even if I delete the bakup job and create a new one.
SSH from my local console is possible without any problems. SSH from the Nethserver web console does not establish a connection.
you can’t think as stupid as reality is - I have whitelisted the IP for the backup destination in thread shield, now the backup job is started and runs. The connection to the destination is established.