You want VyOS to send a remote backup through SFTP after every commit, so you configure it with
set system config-management commit-archive location sftp://user:password@address:port/directory
The server is a vsftpd on CentOS
When you do
you get the following error:
curl: (51) SSL peer certificate or SSH remote key was not OK
However, if -on same VyOS- you do
sudo sftp -P port user@address
and enter the password when prompted, Then the SFTP session is established without a problem.
@Dmitry found where the problem is and described a workaround:
and replace the following line
$cmd = "curl -g -s -S -T $tmp_push_file $uri/$save_file";
with this one
$cmd = "curl -k -g -s -S -T $tmp_push_file $uri/$save_file";
Adding option -k (insecure) allows the connection to be established even though certificates cannot be verified, as in auto-signed certificates, so remote backup can be done through VyOS CLI without the mentioned error.