How to lock local users(using SSH keys for login) based on inactivity in Red Hat Enterprise Linux 6/7

Solution Verified - Updated -


  • How do I lock user accounts based on inactivity which use SSH keys (and not password) for login in RHEL 6/7?
  • I tried configuring module to local local users based on inactivity but it doesn't work for users which use SSH keys for login.


  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.