use ssh_login_pubkey module to get shell
msf > use auxiliary/scanner/ssh/ssh_login_pubkey
Users and their passwords can be obtained from misconfigured webservers, shared file systems, etc.
copy your public key to /root/.ssh/authorized_keys on remote server
use auxiliary/scanner/ssh/ssh_login