Scheduled backup using ssh identify file

The server to which I am backing up to REQUIRES the use of a certificate file. Which is good. So, in virtualmin backup schedule, on some machines, I put simply the hostname for the "ssh server" field and those work if:

  1. There is a name set up that matches in /root/.ssh/config with the login details and
  2. DNS resolves via a search domain such that the destination domain is appended to that short hostname

However, I don't want to use #2 since it's not my domain, do, don't want to waste time with it as a search domain.

So, without that, simply putting in the name of the host in the /root/.ssh/config file yields an error "Error: SSH server hostname cannot be resolved". That's what is logged, on the screen it says "Failed to save scheduled backup : SSH server hostname cannot be resolved". Well, maybe that's true, since that name is the name from the ssh config file, not the true hostname. If I put the true hostname, of course, it fails since it doesn't have all of the detrails abiout the identify file. If I try to embed -i filename, that fails being invalid syntax to backup.

So, I need a way to plug in something into the ssh server field that allows me to use the details from the ssh config file so I can log into a machine requiring no user/pwd, but, an identify file without adding the search domain trick. I also cannot us ethe default identify file /root/.ssh/identity since that is used for something else.

So, for me, virtualmin needs to allow one to specify the identityfile used for a ssh connection that is passwordless. Is there a way?

Status: 
Closed (fixed)

Comments

Why not enter the full hostname in Virtualmin, and put a second block in /root/.ssh/config for that hostname with the correct identity file specified? Something like :

Host fullhostname.domain.com
    IndentityFile /path/to/keyfile

Funny you should say that, just did that. It's not obvious though on how to use scheduled backups with ssh identity files. Perhaps some more documentation, or, perhaps a field to actually type in the identify file name would be in order?

What I'll do in the 3.91 Virtualmin release is add a field on the Virtualmin Configuration page to specify additional parameters to the ssh and scp commands, so you could enter something like : -i /path/to/identity-file

That would be wonderful, and clear to everyone!

Automatically closed -- issue fixed for 2 weeks with no activity.