Recently I had to discover custom SSH port on the server so I needed to come up with a somewhat quick way to check for open ports on the server. To do that simplest and prettiest solution I’ve found was using netcat utility. As you can see by looking at syntax I prefer OpenBSD one.