SSH vs Telnet
SSH and Telnet are two network protocols, which are used to connect to a remote computer by login into that system within a network or over the internet, and to control that system using remote commands. So, both of them are considered as terminal emulators. SSH stands for Secure Shell, and SSH allows user to exchange data between a pair of computers in a network using secure encrypted connection. Telnet is a basic network protocol that is used to communicate with a remote system using text-based terminal virtually.
What is SSH?
SSH, Secure Shell is a network protocol, which is used to establish a secure connection between two remote hosts over the internet or within a network. SSH uses an encrypted format to transfer data among computers, so this encrypted mechanism, provides confidentiality and integrity of data being exchanged. SSH is widely used for remote login systems and for executing remote commands because of its high security available. Using SSH, the users can send confidential data such as username, password and other commands in a secure way as all these data are in encrypted format, and cannot be deciphered and read by hackers easily. SSH uses public key cryptography for authentication of the remote system. SSH servers by default listen to port 22 over TCP (Transmission Control Protocol) standard, and they can be used in public networks. It provides strong authentication and secure communication mechanism over insecure channels.
What is Telnet?
Telnet is also a network protocol that is used to exchange data in a bidirectional way between two remote hosts in a network or over the internet. Using this protocol the users can log into a remote system and communicate using virtual terminal, but this is insecure for using over unreliable networks, such as internet. Telnet exchanges data in plain text, so it is not suitable for sending confidential data containing usernames and passwords using this protocol, because anyone else can read this text being exchanged and can intercept the messages easily. Telnet typically communicates via port 23 over TCP, and it can access other ports and services, too. It can be used in private networks due to less security.
What is difference between SSH and Telnet?
– SSH and Telnet are both network protocols that allow users to login to remote systems, and execute commands on them.
– Access to command line of a remote host is similar in both protocols, but the main difference of these protocols depends on the security measure of each. SSH is highly secured than Telnet.
– By default, SSH uses port 22 and Telnet uses port 23 for communications, and both use TCP standard.
– SSH sends all the data in encrypted format, but Telnet sends the data in plain text. Therefore, SSH uses a secure channel to transfer data over the network, but Telnet uses normal way to connect to the network and to communicate.
– Further, SSH uses public key encryption in order to authenticate the remote users, but Telnet uses no authentication mechanisms.
– So, private data, such as usernames and passwords, should not be sent using Telnet, as it most probably, can cause malicious attacks. It is strongly recommended using SSH for remote login systems, since data sent using this protocol cannot be easily interpreted by the hackers.
– Considering the security available in each protocol, SSH is suitable for using in public networks, although they are reliable or not, but Telnet is suitable only for private networks.
– Finally, the Telnet protocol has a large number of drawbacks in security perspective and SSH protocol has overcome most of those security issues. So SSH can be considered as a replacement to the Telnet protocol.