Submitted by RyanJohnson on Fri, 03/21/2014 - 18:42
Hi,
How do I go about copying / setting up SSH keys to an existing Virtualmin system using the one generated in Cloudmin?
Which users from the Master is used to authenticate to the managed system .. is it root?
Cheers, Ryan
Status:
Active
Comments
Submitted by JamieCameron on Fri, 03/21/2014 - 20:30 Comment #1
Do you mean you want an existing system to allow SSH logins using the key that Cloudmin is using for another system?
If so, you need to copy across entries from the /root/.ssh/authorized_keys file.
Submitted by RyanJohnson on Mon, 03/24/2014 - 03:08 Comment #2
Thanks Jamie,
I've managed to login via SSH as root to the guest with the key but am getting the following error from the Cloudmin interface
Re-fetching system status .. .. done. New status is : SSH login failed
Is there aw to check / change what credentials are used?
Ta. Ryan
Submitted by RyanJohnson on Mon, 03/24/2014 - 03:21 Comment #3
FYI .. I recently changed the hostname of the KVM vm .. Don't know if that has something to do with it
Submitted by RyanJohnson on Mon, 03/24/2014 - 14:35 Comment #4
I deregistered the instance and tried adding it again and am getting this error message:
Checking SSH login .. .. SSH connection failed : Login failed (The authenticity of host '203.98.94.35 (203.98.94.35)' can't be established. ECDSA key fingerprint is 74:88:2a:6e:40:63:c5:0a:0c:05:fa:65:80:81:e7:25. Are you sure you want to continue connec)? Warning: Permanently added '203.98.94.35' (ECDSA) to the list of known hosts. Permission denied, please try again. )
I copied the exact keys and it works via ssh
Submitted by RyanJohnson on Mon, 03/24/2014 - 15:25 Comment #5
I found the problem.
For some reason when I moved a virtual host from one system to the system I'm trying to access it changed the ownership of the /root folder to that of the virtualhost I was moving to the new system
Submitted by JamieCameron on Mon, 03/24/2014 - 18:41 Comment #6
Wow, changing the ownership of /root should never happen!
Did you perhaps do a backup to that directory?
Submitted by RyanJohnson on Mon, 03/24/2014 - 18:51 Comment #7
I'd say that I did do a backup to that directory from another system as there's backup files in /root.. I would have used the root user's credentials and selected /root as the destination -- I can't remember exactly how I did it as it was late last year sometime.