Rapid7 Vulnerability & Exploit Database

SSH Public Key Login Scanner

Back to Search

SSH Public Key Login Scanner



This module will test ssh logins on a range of machines using a defined private key file, and report successful logins. If you have loaded a database plugin and connected to a database this module will record successful logins and hosts so you can track your access. Key files may be a single private key, or several private keys in a single directory. Only a single passphrase is supported however, so it must either be shared between subject keys or only belong to a single one.


  • todb <todb@metasploit.com>
  • RageLtMan


Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use auxiliary/scanner/ssh/ssh_login_pubkey
msf auxiliary(ssh_login_pubkey) > show actions
msf auxiliary(ssh_login_pubkey) > set ACTION < action-name >
msf auxiliary(ssh_login_pubkey) > show options
    ...show and set options...
msf auxiliary(ssh_login_pubkey) > run 

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security