Ping works on the third layer of the OSI model, the network layer .
It is mainly used to test whether the network reaching the destination host is connected and cannot detect whether a port is open.
Ping uses the ICMP protocol and does not use a specific port.
You can also ping the domain name, so that you can directly see the IP address of the domain
SSH is similar to Telnet, which is a remote login tool.
SSH is divided into two parts: Server side and Client
The server side is a daemon that processes client connection requests, typically sshd
clients include SSH programs and other applications such as Scp,slogin,sftp
The biggest difference between them is that SSH is encrypted for transmission , security is high, Telnet is used in clear text transmission , less secure.
Tables are available to represent major differences (originating from Https://techdifferences.com/difference-between-telnet-and-ssh.html#Definition):
BASIS for COMPARISON |
TELNET |
SSH |
Security |
Less secured |
Highly secured |
Uses Port number
|
23 |
22 |
Data format |
Telnet sends the data in plain text. |
Encrypted format is used to send data and also uses a secure channel. |
Authentication |
No privileges is provided for users authentication. |
Uses public key encryption for authentication. |
Suitability of the network |
Private Networks is recommended. |
Suitable for public networks. |
Vulnerabilities |
Vulnerable to security attacks. |
SSH has overcome many security issues of Telnet. |
Bandwidth Usage |
Low |
High |
In addition, Telnet can test whether a port on a remote host is open , and the command is:
Telnet Ip/domain Port
Comparison of PING,TELNET,SSH commands under Linux