How to increase the number of password attempts for ssh from default 3 attempt in Red Hat Entperprise Linux?

Solution Verified - Updated -


  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6


  • When user tries to log in via ssh, ssh closes connection after three failed attempts. We want to increase the number of authentication attempts ( password prompt ).


  • On the Red Hat Enterprise Linux ssh-client system, modify or declare the NumberOfPasswordAttempts option in the /etc/ssh/ssh_config file as per requirement. For setting log in attempts to five times, the option would be declared as below :
NumberOfPasswordAttempts 5

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.