What is the equivalent oftelnet localhost 25using SSH ?Clarification : I would like to have an SMTP connection with a server using SSH, just like it can be done with a command like telnet localhost 25.
What is the equivalent of telnet localhost 25 with ssh?
ssh;smtp;telnet
If you are asking What is the way to connect to an SMTP server using SSH instead of telnet? the answer is there is none.SSH only communicates over ports using the SSH protocol. Using it to connect to any other port will fail, because SSH will try to speak the SSH protocol, which will not be understood by an SMTP server (or FTP, or other server processes).You can connect to other SSH servers which run on other ports, but I interpreted your question to mean you wanted to talk SMTP to a mail server.