Skip to main content
electrovalent
New Member
March 28, 2025
Question

sftp connection

  • March 28, 2025
  • 4 replies
  • 1582 views

Hi,

I am trying to connect to sftp via:

execute backup config sftp /mnt/Data1/nas/Fortigate_Backup/%%date%%-backup.conf 10.10.10.10 domain\user <password> encryption-<encryption>

 

On a FGT80 with v.7.2.11

The error is:  Connect to sftp server 10.10.10.10 ...
Send config file to sftp server via vdom root failed.
Command fail. Return code -1.

 

I can successfully login to sftp from other clients.

 

Any thoughts? thanks in advance

 

John

4 replies

dingjerry_FTNT
Staff
Staff
March 28, 2025

Hi @electrovalent ,

 

Please make sure that you have a route entry to 10.10.10.10 in the root VDOM.

electrovalent
New Member
March 30, 2025

Hi dingjerry_FTNT,

 

Yes i have a route entry.

 
AEK
SuperUser
SuperUser
March 28, 2025

Hi Electrovalent

Try ssh from FGT root VDOM to the server.

exec ssh username@10.10.10.10
AEK
electrovalent
New Member
March 30, 2025

Hi AEK,

 

I can successfully connect using:

exec ssh user@domain.example@10.10.10.10

 

Also tried to change the command to:

execute backup config sftp /mnt/Data1/nas/Fortigate_Backup/%%date%%-backup.conf 10.10.10.10 user@domain.example <password> encryption-<encryption>

With no success

AEK
SuperUser
SuperUser
March 30, 2025

Hi Elec

It can be related to access rights. So can you try ssh to the same server with the same user and try write some file to the same target folder?

AEK
ametkola
Staff
Staff
April 2, 2025

Hello @electrovalent ,

 

Please check and perform the steps as in the article to further verify this issue :

https://community.fortinet.com/t5/FortiGate/Troubleshooting-Tip-Unable-to-backup-FortiGate-config-to/ta-p/317017

 

Regards,

 

 

AEK
SuperUser
SuperUser
April 2, 2025

One last try..

If your password contains special characters please put the password between quotes ot double quotes.

'password' or "password".

AEK