How can I change the port to do a backup over SSH

In Webmin >> Backup Configuration Files

if I set the destination to use SSH (or FTP) I get the option to change from the default ports usually set for these processes.

In Virtualmin >> Backup and Restore >> Backup Virtual Servers

there is no equivalent option to allow me to change ports. How can I do it - is there a workaround?



Hi Mark,

I don’t know if it will work, but try hostname:port

Howdy – miner is correct, using “hostname:port” in the hostname field on the backup screen will do the trick for you.


Indeed it does do the trick. Thank you both.

Webmin/virtualmin Backup to a non standard port does not work when using Webmin, Fitesystem backup.


I get the following error.
Failed to save backup : Missing or invalid host to backup to

Why it is not accepting other ports than port 22? Not workable. Pleae fix.


confirmed. I also have problems connecting to my SSH server using a custom port. A manual check thru console is working fine from the same server so it’s no firewall or other access issue.

Eric, maybe you could double check why it might not be working?


Hi I’ve also discovered this problem too. My backup server is on the internal lan and uses a port forward with a different port. But there is no way to specify the port in Filesystem Backup in webmin. It would be great if this could please be added or if there is a workaround?



You may want to file a feature request using the Support link above for that particular feature… it wouldn’t be bad to see that supported (or, if there’s some way I don’t know about, Jamie would be able to explain how to do that).


Ok thanks I’ll give it a go!

Right I’ve opened a feature request here:


::Step (1)

A) login as root and test it once


B) populate the “/root/.ssh/known_hosts” file

::Step (2)

Create a file called : /root/.ssh/config

The things you will need:

  1. IP Address use this also in the host field

  2. Port Number 27272


Example “ping -c 4

(Warning Do NOT include the line numbers)

Example file contents on 3 lines:

  1. Host
  2. HostName
  3. Port 27272

i know this is a old thread but i came across this problem a few times, thought id post a solution for others to use as finding this in the depths of the internet was like winning the lotto

ssh into current server that has webmin installed

nano /etc/webmin/virtual-server/config

add in at the bottom or anywhere in the list

ssh_args=-P 25874   

replacing 25874 with the custom ssh port of the server you are sending the backups to.
restart webmin then just use username and password as normal in backup section
Hope this helps someone.