using: ~# nc <ip address> <ssh port> might give both SSH and linux versions.
a simple SSH login might give us the banner ( title ) for the purpose of the service
search type:auxiliary name:ssh
auxiliary/scanner/ssh/ssh_login
Brute Force SSH.... (If you find a session and it doesn't response to commands. Create a Bash session : /bin/bash -i)
After finding a password you can check: sessions and use them: sessions -i 1
auxiliary/scanner/ssh/ssh_enumusers
If Brute Force isn't successful try it to get available users.
ssh2-enum-algos
ssh-hostkey --script-args ssh_hostkey=full
ssh-auth-methods --script-args ssh.user=<username>
libssh is a multiplatform C library implementing the SSHv2 protocol on client and serverside.
libssh V0.6.0-0.8.0 is vulnerable to an authentication bypass vulnerability in the libssh server code that can be exploited to execute commands on the target server.
auxiliary/scanner/ssh/libssh_auth_bypass
Then and run.
set SPAWN_PTY true