SSH into EC2 Ubuntu


Hello All,

I'm having an issue with my Ubuntu-Noble-24.04-Amd64 Server. I'm not sure if it is an AWS issue or a Linux issue. I am able to SSH into the Linux server using the default Ubuntu account and the key pair I've configured. I want to SSH our AD accounts into this server. I've joined the server to the domain and permitted specific AD user profiles. However, I keep getting denied by the server stating "Server refused our key" and "No supported authentication methods available (server sent: publickey)".


I've created a home directory for my new user., added the public key from Ubuntu in the authorized_keys file of the new user. (Did not work). I generated new key pairs using key-gen and added the public key to the authorized_keys file in newuser. However, when I updated the SSH private key in my Putty on my client, I got the same error. (It did not work.)

I checked the /etc/ssh/sshd_config PubKeyAuthentication yes (enabled) AuthorizedKeyFile .ssh/authorized_keys (Enabled) UsePAM yes (enabled)

Permissions granted to newuser: chown newuser /home/newuser -R chmod 700 /home/newuser /home/newuser/.ssh chmod 600 /home/newuser/.ssh/authorized_keys

Any additional information would be greatly appreciated.

asked 6 days ago101 views
1 Answer
Accepted Answer

This is definitely a Linux question. Configuring Linux integration with AD is a pretty advanced configuration.

There is a nice video walk through of the process here:
Should not be much different for 24.04 vs. 22.02 in the video.

Hope this helps!

profile pictureAWS
answered 6 days ago
profile picture
reviewed 5 days ago
profile picture
reviewed 5 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions