SSH into EC2 Ubuntu

0

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)".

Troubleshooting:

I've created a home directory for my new user. newuser@my.domain.com, 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 2 months ago466 views
1 Answer
0
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: https://www.youtube.com/watch?v=-4tFpUiEONo
Should not be much different for 24.04 vs. 22.02 in the video.

Hope this helps!

profile pictureAWS
EXPERT
iBehr
answered 2 months ago
profile picture
EXPERT
reviewed 2 months ago
profile picture
EXPERT
reviewed 2 months ago