logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

authorized-keys-test - Validate a authorized_keys file

Author

       2009, Mike Schilli <cpan@perlmeister.com>

perl v5.36.0                                       2022-10-13                           AUTHORIZED-KEYS-TEST(1p)

Description

       authorized-keys-test reads in the keys of an ssh client authorized_keys file and reports any errors.

Examples

         $ authorized-keys-test ~/.ssh/authorized_keys

         /home/joe/.ssh/authorized_keys ok
         Found 4 keys
           * ssh-2
           * ssh-2
           * ssh-2
           * ssh-2

            # strict mode:
         $ authorized-keys-test -s ~/.ssh/authorized_keys

         AuthorizedKeysFile.pm-69: Key [eme alsdkfj] failed sanity check -- ignored
         AuthorizedKeysFile.pm-71: Strict mode on: Abort
         /home/joe/.ssh/authorized_keys *not* ok
         Found 4 keys
           * ssh-2
           * ssh-2
           * ssh-2
           * ssh-2

Legalese

       Copyright 2009 by Mike Schilli, all rights reserved.  This program is free software, you can redistribute
       it and/or modify it under the same terms as Perl itself.

Name

           authorized-keys-test - Validate a authorized_keys file

Options

       -v  Verbose mode. Turns on DEBUG instead of INFO.

       -s  Strict  mode. If on, the test insists on properly formatted authorized_keys files and isn't nearly as
           lenient as the sshd daemon's parser.

Synopsis

           authorized-keys-test ~/.ssh/authorized_keys

See Also