[EC2] SSH login mode

Cloudmin isn't using SSH key when choosing "Using SSH key" (it keeps trying to log in using password) while trying to add a system.

From the remote server logs: sshd[32492]: Failed password for root from 123.123.123.123 port 53403 ssh2

Details: - Cloudmin and Ubuntu are fully up to date - The remote system is an EC2 instance - Root user is passwordless

Additionnal details: - Selecting "Do not attempt SSH login" will successfully add the system. - Using a terminal with the key will work fine

Status: 
Closed (fixed)

Comments

Does this EC2 instance perhaps disallow direct root SSH logins? You can test this by trying to SSH to it as root from the command line, using the key you created when setting up your EC2 account.

Hello Jamie,

Thanks for the quick reply.

SSH login works like a charm when using the SSH key with the root user (from a terminal).

It seems that cloudmin tries using password authentification when looking at the auth.log logs,

from auth.log;

Nov 7 18:12:43 ip-10-73-183-171 sshd[14259]: Failed password for root from x.x.x.x port 53155 ssh2

Nov 7 18:13:18 ip-10-73-183-171 sshd[14276]: Accepted publickey for root from x.x.x.x port 60034 ssh2

The first (failed) attempt is done by Cloudmin using "SSH key" (but, according to the logs, cloudmin tried using a password)

The second (successful) attempt using the SSH key from a terminal.

I also tried generating a new key using the cloudmin gui and then build an EC2 using the key. But again, it failed (same result -> According to the logs, cloudmin tried using a password).

Thanks in advance!

Marc

Try selecting the EC2 instance from the left menu, then clicking on Change Password. You should be able to choose the SSH key that Cloudmin uses to login on that page.

Hello Jamie,

I'm not sure why but the problem came from the EC2 imported & installed key using Cloudmin GUI.

Even if the key is valid, it seems that Cloudmin is breaking something (probably making the public key multiline or something).

What did put me get on the right path: When trying to re-save an existing, imported (using Cloudmin) and proven functionnal key (in a terminal) from AWS, cloudmin is giving the following error: Failed to save SSH key : Pasted text does not appear to be an SSH key

The weird part on that error is: The import was made by Cloudmin.

So, the workaround that I found is: From cloudmin: 1) Generate a new SSH key (NOT for EC2) 2) Export/Import key to EC2 (using the AWS GUI) 3) Enjoy Cloudmin!

Anyways, thanks for the support!

Feel free to contact me if you need any further info regarding that particular issue.

Best,

Marc