pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser

Tác giả NetworkEngineer, T.Một 27, 2021, 09:06:50 SÁNG

« Chủ đề trước - Chủ đề tiếp »

0 Thành viên và 2 Khách đang xem chủ đề.

Mã nguồn [Chọn]
an 27 15:52:17 localhost.localdomain sshd[4308]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=localhost  user=root
Jan 27 15:52:17 localhost.localdomain sshd[4308]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Jan 27 15:52:19 localhost.localdomain sshd[4308]: Failed password for root from ::1 port 40562 ssh2

Các bạn gặp lỗi này khi kết nối SSH đến máy chủ Linux và trong /var/log/secure thông báo lỗi trên.
Để giải quyết được lỗi này thì các bạn cần chắc chắn chứa tham số PermitRootLogin yes trong tập tin cấu hình của SSH /etc/ssh/sshd_config

Để giới hạn kết nối SSH đến máy chủ Linux thì các bạn hãy sử dụng cú pháp như sau.

Mã nguồn [Chọn]
Match host localhost
       PermitRootLogin yes
       PubkeyAuthentication yes
       PasswordAuthentication yes
 
Match Address 192.168.29.74
       PermitRootLogin yes
       PubkeyAuthentication yes
       PasswordAuthentication no