SFTP backup fails with username 'user@domain.com'

I can’t seem to connect to SFTP when a username consists of “user@domain.com” as full username.
With all my tested clients and also on the CLI of Nethserver I can login with the credentials just fine, but in Cockpit the login gives me a Configuration error when testing the input.

So, to be clear; the SFTP server needs me to login with “user@domain.com”@“domain.com”, but Cockpit doesn’t accept this input. Is this a bug or something else? Thanks.



here I agree

─stephdl@leo.lan ~  ‹master› 
╰─➤  sftp root@nethservertest.org
Connected to nethservertest.org.

Sorry I cannot reproduce, sftp stephane@domain.com just works fine

yes I saw in the console of developer (F12) some crash that cannot help you and show which validator has failed. I used the SFTP backup wizard of cockpit
However, even if I can use root to login by sftp on the server, indeed stephane@domain.com is not accepted. I took care to use the folder of the home user, not tried another folder.

cc @dev_team

​ exit_signal: null

    exit_status: 1

message: "/usr/bin/sudo exited with code 1"

   problem: null

    toString: function toString()​
<prototype>: Object { … }
checkWhereConfiguration Backup.vue:2648
exec nethserver.js:119
s cockpit.min.js:963
f cockpit.min.js:975
n cockpit.min.js:881

Yeah, seriously … @ should not be part of a username :wink:

There are some possible ways to make it work, try:

  1. user+domain.com@example.com
  2. ‘user@domain.com’@example.com
  3. user@domain.com@example.com

Thank you.
Are you using a user that is in the form of “stephane@domain.com@domain.com”? So the username is actually “stephane@domain.com”?
Like this:

In the Chrome webconsole I can see the username looks to be parsed right, but there is indeed an error that I cannot understand and I don’t know if it is even related:

The parsed variables:

a.onmessage.o.dispatch_data @ cockpit.js:422
5nethserver.js:41 API exec: system-backup/read$ echo ‘{“action”:“running-info”}’ | /usr/bin/sudo /usr/libexec/nethserver/api/system-backup/read | jq
nethserver.js:41 API exec: system-backup/validate$ echo ‘{“SftpDirectory":“myBackupFolder”,“SftpUser”:"user@mydomain.com”,“SftpPassword”:“mysecretpassword”,“SftpHost”:“mydomain.com”,“SftpPort”:“22”,“togglePass”:false,“toggleEdit”:true,“action”:“sftp-credentials”}’ | /usr/bin/sudo /usr/libexec/nethserver/api/system-backup/validate | jq

Yeah, I totally agree with you. This however is a commercial company that offers the SFTP login this way. I need to be able to login with user@domain.com@domain.com. This is no problem in de CLI, but Cockpit doesn’t like it, it seems.

1 Like