Difference between SSH and Telnet

If you have been using a linux distro for quite long time now and you are not a newbee at linux anymore then you might have come across the terms like SSH and telnet. They are pretty similar when it comes to facility they provide but did SSH come into play when Telnet already existed?

SSH or Secure SHell

SSH or Secure SHell is now only major protocol to access the network devices and servers over the internet. SSH was developed by SSH Communications Security Ltd., it is a program to log into another computer over a network, to execute commands in a remote machine, and to move files from one machine to another.

  • It provides strong authentication and secure communications over insecure channels.
  • SSH runs on port 22 by default; however it can be easily changed. SSH is a very secure protocol because it shares and sends the information in encrypted form which provides confidentiality and security of the data over an un-secured network such as internet.
  • Once the data for communication is encrypted using SSH, it is extremely difficult to decrypt and read that data, so our passwords also become secure to travel on a public network.
  • SSH also uses a public key for the authentication of users accessing a server and it is a great practice providing us extreme security. SSH is mostly used in all popular operating systems like Unix, Solaris, Red-Hat Linux, CentOS, Ubuntu etc.
  • SSH protects a network from attacks such as IP spoofing, IP source routing, and DNS spoofing. An attacker who has managed to take over a network can only force ssh to disconnect. He or she cannot play back the traffic or hijack the connection when encryption is enabled.
  • When using ssh’s slogin (instead of rlogin) the entire login session, including transmission of password, is encrypted; therefore it is almost impossible for an outsider to collect passwords.

Installation of the OpenSSH client and server applications is simpler.
To install it on your Ubuntu system, use this command at a terminal prompt:

$sudo apt-get update
$sudo apt install openssh-client

To install the OpenSSH server application, and related support files, use this command at a terminal prompt:

$sudo apt-get update
$sudo apt install openssh-serve

And that’s pretty much it! Simple no?

Telnet

Telnet is the joint abbreviation of Telecommunications and Networks and it is a networking protocol best known for UNIX platform. Telnet uses the port 23 and it was designed specifically for local area networks.

  • Telnet is famous for being the original Internet when the Net first launched in 1969 and was built to be form of remote control to manage mainframe computers from distant terminals. In those original days of large mainframe computers, telnet enabled research students and professors to ‘log in’ to the university mainframe from any terminal in the building.
  • This remote login saved researchers hours of walking each semester. While telnet pales in comparison to modern networking technology, it was revolutionary in 1969, and telnet helped pave the way for the eventual World Wide Web in 1989. While telnet technology is very old, it is still in some use today by purists.
  • Telnet is not a secure communication protocol because it does not use any security mechanism and transfers the data over network/internet in a plain-text form including the passwords and so any one can sniff the packets to get that important information.
  • There are no authentication policies & data encryption techniques used in telnet causing huge security threat that is why telnet is no longer used for accessing network devices and servers over public network.

On a Ubuntu(a famous and my personal favourite linux distro.)
We can install the telnet server with following commands:

$sudo apt-get install xinetd telnetd

The service should be fired-up automatically once the installation is done. Your may also check the service status if required using:

$sudo /etc/init.d/xinetd status

To Telnet an IP:

$telnet serverip

If you would like to change its ports, you’ll need to edit /etc/services with the line:

$telnet 23/tcp 

Once changed, restart to apply the changes with:

$sudo /etc/init.d/xinetd restart

Right now it might looking like some tedious and wacky terminal commands but if you try to run them once on your terminal, trust me you’ll find it extremely easy!

Just like SSH, Telnet is also apparently just a dull and boring terminal screen but with some unimaginable features.

Differences between SSH and Telnet

  1. SSH is more secure compared to Telnet
  2. SSH encrypts the data while Telnet sends data in plain text
  3. SSH uses a public key for authentication while Telnet does not use any authentication
  4. SSH adds a bit more overhead to the bandwidth compared to Telnet
  5. Telnet has been all but replaced by SSH in almost all uses
  6. SSH and Telnet commonly serves the same purpose

Lastly, there are some SSH clients, the software that you can use to setup a connection with the SSH server available for all the major operating systems and tablet operating systems.

  • Mac OS X & Linux: built-in, available in Terminal
  • Windows: PuTTY, others
  • Andriod: JuiceSSH, others
  • iOS: Prompt, others

If you want to connect your Windows PC with a Linux PC then you a software called ‘PuTTY’ which you can download from here.
After installation it’ll look a lot like this:
PuTTY

References : askubuntu.com



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.