This question already has an answer here:
I have ssh access to my Linux server and I want to check whether port 25 open or not.
I discussed with hosting service provide and they said port 25 is open.
I checked using PHP script for port 25 and it says it is open.
I want to know how to check using command on linux server like in Windows I can use
telnet example.com 25