Linux – get permission denied every time I try to ssh from an amazon ec2 server to another linux host

amazon ec2linuxssh

I have an EC2 base instance, and they usually have password authentication disable in the sshd service. They only authenticate with key. The situation I have is every time I try to ssh into another linux host that authenticate with password I get the following message:

Warning: Permanently added
'customerstg.domain.net'
(RSA) to the list of known hosts.
Permission denied
(publickey,gssapi-with-mic,password).

Best Answer

Ok. Sorry to bother everyone. I found the issue of my situation. In my EC2 server, under the /root/.ssh/ directory is a file called config.

This file had the following settings:

StrictHostKeyChecking no
CheckHostIP no

PasswordAuthentication no

I change the PasswordAuthentication from no to yes.

And that fixed the situation. I hope this helps other people.

Related Topic