Is it possible to put restrictions on passphrases used with SSH key-based authentication?

Solution Verified - Updated -

Issue

  • We want to have the following restrictions in place on a server for incoming SSH connections which are authenticated via public key:
    • Private/public key pair should have a passphrase
    • Passphrase should have a minimum length of 8 characters
    • Reject Keys with Passphrases that have Dictionary based passwords, letter, number sequences or usernames
    • Passphrase should have at least one number and one special character
    • Passphrase should have combinations of uppercase and lowercase letters

Environment

  • Red Hat Enterprise Linux

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
Close

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