SFTP backup set up fails with "Configuration error"

SFTP backup set up fails with “Configuration error”

I have tested on two Nethserver installs and both can not connect to the SFTP server. I have tested the SFTP server connection with WinSCP and connect without error.

Example config I have been using -

SFTP Host -
123.123.123.123

SFTP port -
22

SFTP User -
backupuser

SFTP password -
password

SFTP Directory -
cloudserverbackup

On check receive “Configuration error. Check configuration properties and retry”

Has anyone any ideas on what is wrong?

I have also tested with same error with a public test sftp site -

SFTP Host -
test.rebex.net

SFTP port -
22

SFTP User -
demo

SFTP password -
password

SFTP Directory -
pub

Does anyone have backups to SFTP working? Does anyone know if there is a fault log?

Under System SSH try un-checking disable weak ciphers and see if it works. I am not sure if that setting affects rsync but its worth a shot.

No that did work. Thanks for suggestion anyway.

For what its worth, I was able to setup sftp to my fileserver on my LAN.

Maybe go to System - Logs and change severity to Everything and All services to see if there are any clues in the logs.

Nice to know that sftp is working your end. Did my config look right?

Re -
Maybe go to System - Logs and change severity to Everything and All services to see if there are any clues in the logs.

The only thing I can see being logged that are happening as I receive the “Configuration error” is -

15:43

exec request failed on channel 0

cockpit-bridge

15:43

using dumb terminal settings.

cockpit-bridge

15:43

No entry for terminal type “unknown”;

cockpit-bridge

15:43

exec request failed on channel 0

cockpit-bridge

15:43

using dumb terminal settings.

cockpit-bridge

15:43

No entry for terminal type “unknown”;

cockpit-bridge

15:42

exec request failed on channel 0

cockpit-bridge

15:42

using dumb terminal settings.

cockpit-bridge

15:42

No entry for terminal type “unknown”;

cockpit-bridge

15:42

exec request failed on channel 0

cockpit-bridge

Check the path of the folder where you want to save, it must be absolute

at the end could you test on an external host to push a file to your server

scp toto.file root@IPserver:/path2my/folder

I use it also myself

If I have in the root of my sftp server a folder called “cloudserverbackup” is my original post settings correct?

Have tried two different SFTP servers on the same LAN as a new install of Nethserver (third Nethserver install tested). WinSCP connects without issue and I can read and write from WinSCP to the SFTP server, but can not get Nethserver to connect.

What am I missing?

SFTP Directory needs to be the absolute path so if you want it to go to /cloudserverbackup you need that slash at the beginning.

Thanks Greg still no good.

I had tried that early on before posting. But it is good to know that that is the format.

This is what mine looks like. Obviously I had to put in the password when I first set it up.

Thanks Greg

Looks like my setup.

Can I ask what is your sftp server (software) that you are using?

The server I am connecting to is running Debian 9 with OpenSSH_7.4p1 Debian-10+deb9u7
Whatever you are connecting to has to be configured to allow sftp over ssh, it might be worth it to double check that it is allowed on the far end.

I have setup another test.

Two VM Nethservers on the same LAN with 7.9.2009 version and with all updates applied.

Nethserver A is the server that I am setting up a SFTP backup profile on.

Settings -
SFTP Host -
192.168.102.250

SFTP port -
22

SFTP User -
test

SFTP password -
(password)

SFTP Directory -
/media/backup

Nethserver B is the server that I have setup as the SFTP server with a user and group setup and assigned to the ssh and sftp access to. I have created a folder /media/backup.

Still the same error when Server A backup is being set up.

Note - I can ping server B from server A.

Can anyone confirm if this config should work?

Nethserver B error log -

sshd Thu Apr 29 2021 10:36:01 GMT+1000 (Australian Eastern Standard Time)

pam_listfile(sshd:auth): Refused user test for service sshd

PRIORITY 1
SYSLOG_FACILITY 10
SYSLOG_IDENTIFIER sshd
SYSLOG_PID 25369
_BOOT_ID bf4dbf277b8c45d3808e4327f2d15b66
_CAP_EFFECTIVE 1fffffffff
_CMDLINE sshd: test [pam]
_COMM sshd
_EXE /usr/sbin/sshd
_GID 0
_HOSTNAME (removed)
_MACHINE_ID 78bc12abd18b4367840c360662deb49f
_PID 25369
_SELINUX_CONTEXT system_u:system_r:sshd_t:s0-s0:c0.c1023
_SOURCE_REALTIME_TIMESTAMP 1619656561690075
_SYSTEMD_CGROUP /system.slice/sshd.service
_SYSTEMD_SLICE system.slice
_SYSTEMD_UNIT sshd.service
_TRANSPORT syslog
_UID 0
__CURSOR s=62e6f116860441c0a219082ebf684c88;i=4f80;b=bf4dbf277b8c45d3808e4327f2d15b66;m=16fca6446b;t=5c111ae048e97;x=c492a8e1035fbf39
__MONOTONIC_TIMESTAMP 98728035435
__REALTIME_TIMESTAMP 1619656561692311

OK I have root access via sftp working with above setup

Sounds like the user you were using possibly did not have the correct file permissions to write to the destination folder. Obviously root has access to everything so that works just fine.

Yes needed address /var/lib/nethserver/home/test (or whatever the user name is you used) as the SFTP Directory -

Would need to create a sub folder via ssh etc if needed a different folder eg /var/lib/nethserver/home/test/serverbackup

It would seem all the SFTP sftp servers I was testing with did not support sftp over ssh.

It would be a suggestion to have a hint in the backup setup maybe as a warning to others. As the logs do not give a hint to the issue.

Thanks for your help Greg

No problem, glad you were able to get to the bottom of this mystery.

This path will be backuped by your second ns, it will increase the size

I am not sure we have a bug to hunt here, you must use valid credentials, the validation is here for that. If you do not pass the validation, the path is not correct, the user is not valid, is not allowed to use ssh or to write in this folder… The list is long