also, very conveniently under /etc/services (Linux, MacOS)
$ grep SSH /etc/services
ssh 22/tcp # SSH Remote Login Protocol
$I’d use “getent”:
$ getent services ssh
ssh 22/tcp
$
Nmap can scan and show the application and version based on various responses and req/response fingerprinting: http://nmap.org/book/vscan-examples.html