Add timeout if SSH password is incorrect

Today, 4th December 2022, Ukraine is still bravely fighting for democratic values, human rights and peace in whole world. Russians ruthlessly kill all civilians in Ukraine including childs and destroy their cities. We are uniting against Putinโ€™s invasion and violence, in support of the people in Ukraine. You can help by donating to Ukrainian's army.

Edit /etc/pam.d/sshd

# PAM configuration for the Secure Shell service
# Standard Un*x authentication.
@include common-auth

# >>>> ADD THIS:
auth       optional  delay=3000000

This will set timeout to 5 minutes.

IF you have no /etc/pam.d/sshd try /etc/pam.d/password-auth

Then restart sshd service

Ivan Borshchov profile picture
Jan 29, 2017
by Ivan Borshchov
Did it help you?
Yes !

Best related