Tag Info

Hot answers tagged

2

On Ubuntu: $ sudo cat /var/log/auth.log|grep ssh|grep Accept On CentOS/RHEL: $ sudo cat /var/log/secure|grep ssh|grep Accept This will show all connections, and how they authenticated [since the log file's last rotation]. If you only want to see password connections, just pipe through another grep: ... grep ssh|grep Accept|grep password


1

Environment variable approach Here's one possibility....if you're happy to have PermitUserEnvironment set to true in your sshd_config then you could use a combination of environment variable against the key and some checking in /etc/profile to alert/reject anyone still using password approach. In your $HOME/.ssh/authorized_keys file you'd have something ...



Only top voted, non community-wiki answers of a minimum length are eligible