Unable to login with username and password in Redhat Machine created in aws

0

Hi Team,

I am unable to login with username and password in the Redhat machine ..even after making PasswordAuthentication yes in sshd_config.

However the same is working fine aws linux.

Pankaj
已提問 5 個月前檢視次數 448 次
4 個答案
1
已接受的答案

Changing PasswordAuthentication to yes in sshd_config is enough on Amazon Linux, but on RHEL PasswordAuthentication also appears in /etc/ssh/sshd_config.d/50-cloud-init.conf

[root@ip-172-31-13-116 ~]# cat /etc/ssh/sshd_config.d/50-cloud-init.conf
PasswordAuthentication no
[root@ip-172-31-13-116 ~]# 

Either set it to yes again in here, or just comment it out sed -i 's/^PasswordAuthentication/#PasswordAuthentication/' /etc/ssh/sshd_config.d/50-cloud-init.conf and then systemctl reload sshd and now users with a password set should be able to login using their password.

profile picture
專家
Steve_M
已回答 5 個月前
profile picture
專家
已審閱 2 個月前
0

Hello.

Have you checked the SSH logs?
Also, have you set a password for the user?

var/log/secure
profile picture
專家
已回答 5 個月前
0

Let me try

Pankaj
已回答 5 個月前
0

Thanks Steve .. your Solution worked

Pankaj
已回答 5 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南