One Hat Cyber Team
Your IP :
10.30.1.1
Server IP :
103.148.201.5
Server :
Linux web-olt 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64
Server Software :
Apache/2.4.52 (Ubuntu)
PHP Version :
8.1.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
6955
/
root
/
usr
/
share
/
nmap
/
scripts
/
View File Name :
ssh-auth-methods.nse
local shortport = require "shortport" local stdnse = require "stdnse" local libssh2_util = require "libssh2-utility" local rand = require "rand" description = [[ Returns authentication methods that a SSH server supports. This is in the "intrusive" category because it starts an authentication with a username which may be invalid. The abandoned connection will likely be logged. ]] --- -- @usage -- nmap -p 22 --script ssh-auth-methods --script-args="ssh.user=<username>" <target> -- -- @output -- 22/tcp open ssh syn-ack -- | ssh-auth-methods: -- | Supported authentication methods: -- | publickey -- |_ password author = "Devin Bjelland" license = "Same as Nmap--See https://nmap.org/book/man-legal.html" categories = {"auth", "intrusive"} local username = stdnse.get_script_args("ssh.user") or rand.random_alpha(5) portrule = shortport.port_or_service(22, 'ssh') function action (host, port) local result = stdnse.output_table() local helper = libssh2_util.SSHConnection:new() if not helper:connect(host, port) then return "Failed to connect to ssh server" end local authmethods = helper:list(username) result["Supported authentication methods"] = authmethods return result end