Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
RinoBroer
New Contributor III

SFTP configuration backup fails if there is an @ in the username

Hi there,

 

SFTP configuration backup fails if there is an @ in the username, Is this configuration not supported?

 

execute backup config sftp <file name> <SFTP server> <username@domain.com> <password>

 

Rino Broer
Rino Broer
1 Solution
gfleming

Suggest you open a TAC case sounds like this is something that will need to be fixed in FortiOS.

Cheers,
Graham

View solution in original post

11 REPLIES 11
gfleming
Staff
Staff

I'm not sure how you can have an @ in a username. How do you SSH to this server? Use the same user syntax as you would when using SSH. SSH is usually "ssh user@hostname". Hostname is what you put in the <SFTP server> field.

Cheers,
Graham
RinoBroer
New Contributor III

Would you check that if an @ in the username is supported? Unfortunately, I do not have SSH access to the server because it is an cloud file service that offers SFTP access.

 

See print screen below:

2022-10-30 09_07_43.png

FileZilla can connect without problems, see log:


Status: Connecting to stack.rinobroer.nl...
Response: fzSftp started, protocol_version=11
Command: open "rinobroer@stack.rinobroer.nl@stack.rinobroer.nl" 22
Status: Using username "rinobroer@stack.rinobroer.nl".
Command: Pass: ***************************
Status: Connected to stack.rinobroer.nl
Status: Retrieving directory listing...
Command: pwd
Response: Current directory is: "/"
Status: Directory listing of "/" successful

 

Rino Broer
Rino Broer
gfleming
Staff
Staff

DOes logging in work if you omit the domain from the user?

Cheers,
Graham
RinoBroer
New Contributor III

I cannot log in with a different username on that particular cloud storage. However, I did test a Synology NAS where I can log in with just a username and it does work properly.

Rino Broer
Rino Broer
gfleming

So what happens when you try to connect with FileZilla using just rinobroer (without the @stack.rinobroer.nlas) as the username?

Cheers,
Graham
RinoBroer
New Contributor III

That obviously doesn't work

Status: Connecting to stack.rinobroer.nl...
Response: fzSftp started, protocol_version=11
Command: open "rinobroer@stack.rinobroer.nl" 22
Status: Using username "rinobroer".
Command: Pass: ***************************
Status: Access denied
Error: Authentication failed.
Error: Critical error: Could not connect to server

Rino Broer
Rino Broer
gfleming

Well then. To be honest this is the first time I've seen a domain as part of a user login to SSH.

Can you escape the @ symbol with a \ to make it work?

execute backup config sftp <file name> <SFTP server> username\@domain.com <password> 

 

Cheers,
Graham
RinoBroer
New Contributor III

hostname # execute backup config sftp fgt.conf stack.rinobroer.nl username\@stack.rinobroer.nl ********
Please wait...
Connect to sftp server stack.rinobroer.nl ...
Please wait...
Connect to sftp server stack.rinobroer.nl ...
Send config file to sftp server via vdom root failed.
Command fail. Return code -1

Rino Broer
Rino Broer
gfleming

Is this the same error message you received previously?

Cheers,
Graham
Labels
Top Kudoed Authors