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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content