[root@labvm3 scripts]# pwd
/usr/share/nmap/scripts
如果VM有多网卡,需要-e指定网卡名
[root@labvm3 scripts]# nmap -sV -p 22 192.168.1.16 -Pn --script ./ssh2-enum-algos.nse -e ens224
Starting Nmap 7.70 ( https://nmap.org ) at 2022-09-20 05:58 EDT
Nmap scan report for 192.168.1.16
Host is up (-0.17s latency).
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 8.4 (protocol 2.0)
| ssh2-enum-algos:
| kex_algorithms: (9)
| curve25519-sha256
| curve25519-sha256@libssh.org
| ecdh-sha2-nistp256
| ecdh-sha2-nistp384
| ecdh-sha2-nistp521
| diffie-hellman-group-exchange-sha256
| diffie-hellman-group16-sha512
| diffie-hellman-group18-sha512
| diffie-hellman-group14-sha256
| server_host_key_algorithms: (5)
| rsa-sha2-512
| rsa-sha2-256
| ssh-rsa
| ssh-dss