How to copy Cloudmin SSH keys to existing physical system

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

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.

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

FYI .. I recently changed the hostname of the KVM vm .. Don't know if that has something to do with it

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

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

Wow, changing the ownership of /root should never happen!

Did you perhaps do a backup to that directory?

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.