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:
- There is a name set up that matches in /root/.ssh/config with the login details and
- 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?
Comments
Submitted by JamieCameron on Sat, 01/28/2012 - 12:15 Comment #1
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
Submitted by sfatula on Sat, 01/28/2012 - 12:17 Comment #2
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?
Submitted by JamieCameron on Sat, 01/28/2012 - 13:39 Comment #3
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
andscp
commands, so you could enter something like :-i /path/to/identity-file
Submitted by sfatula on Sat, 01/28/2012 - 23:24 Comment #4
That would be wonderful, and clear to everyone!
Submitted by Issues on Sat, 02/11/2012 - 23:46 Comment #5
Automatically closed -- issue fixed for 2 weeks with no activity.