MacOS and sshd versions
It is sometimes useful to determine remotely the version of MacOS being run on a machine to which one does not have access. If the machine is running sshd (i.e. has remote logins enabled), and is using the version of OpenSSH provided with the OS, this is possible. I believe the following table, mostly gathered by scraping the Internet, to be correct, but probably incomplete.
Version | Name | OpenSSH |
---|---|---|
10.5 | Leopard | 4.5p1 |
10.5.2 | Leopard | 4.7p1 |
10.5.5 | Leopard | 5.1p1 |
10.6 | Snow Leopard | 5.2p1 |
10.7 | Lion | 5.6p1 |
10.8 | Mountain Lion | 5.9p1 |
10.9 | Mavericks | 6.2p1 |
10.10 | Yosemite | 6.2p2 |
10.11 | El Capitan | 6.9p1 |
10.12 | Sierra | 7.2p2 |
10.12.2 | Sierra | 7.3p1 |
10.12.3 | Sierra | 7.4p1 |
10.13 | High Sierra | 7.6p1 |
10.14 | Mojave | 7.8p1 |
10.15 | Catalina | 8.1p1 |
11.0 | Big Sur | 8.1p1 |
12.0 | Monterey | 8.6p1 |
13.0 | Ventura | 9.0p1 |
Examples of how to find the remote version number (here target.domain is running Mojave):
$ nc -d -q 1 target.domain 22 SSH-2.0-OpenSSH_7.8
or
$ ssh -v target.domain [...] debug1: Remote protocol version 2.0, remote software version OpenSSH_7.8 [...] ^C
or
$ telnet target.domain 22 Trying 192.168.9.89... Connected to 192.168.9.89. Escape character is '^]'. SSH-2.0-OpenSSH_7.8 ^] telnet> quit