I'm reading a book on network programming with Go. One of the chapters deals with the /etc/services file. Something I noticed while exploring this file is that certain popular entries like HTTP and SSH, both of which use TCP at the transport layer, have a second entry for UDP. For example on Ubuntu 14.04:
ubuntu@vm1:~$ grep ssh /etc/services
ssh 22/tcp # SSH Remote Login Protocol
ssh 22/udp
ubuntu@vm1:~$ grep http /etc/services
http 80/tcp www # WorldWideWeb HTTP
http 80/udp # HyperText Transfer Protocol
Anyone know why these have two entries? I don't believe SSH or HTTP ever use UDP (confirmed by this question for SSH).
22/udp
was removed in Debian in 2016. IANA still lists 22/udp and lists both udp and tcp for most protocols that are only usually implemented on either one of them. Could just be that it means 22 is reserved for ssh in case somebody wants to implement ssh over udp some day?