If you need to connect to a remote computer using the command line, you might be tempted to use Telnet, one of the oldest protocols still in use on the internet. But you shouldn't, because it's not safe for your digital privacy.

This article will discuss the reasons why you shouldn't use Telnet and what other secure protocols you can use to connect to servers remotely.

Telnet Is Insecure

The main problem with Telnet is that it isn't secure. All of the text sent between computers using Telnet is in plain text. This includes usernames and passwords as well. If you're using Telnet, someone can easily intercept the connection and will be able to see any credentials you send using a "man-in-the-middle attack."

WSL Ubuntu Telnet manpage

This is an example of the different cultures that Arpanet, the original network that became the internet, was developed under. As a US government research project in the late 1960s and early 1970s, Arpanet was experimental and had no ambitions to become the massive global network that the modern internet is today.

The developers were academics connecting the country's major research universities and they trusted each other. Surely, nobody would ever try to break into a computer.

Use SSH and Mosh Instead

Such a password-stealing attack motivated Tatu Ylönen, then at the Helsinki University of Technology in Finland, to create Secure Shell or SSH. The OpenBSD project OpenSSH is one of the most widely deployed across modern Unix and Linux systems. Even Windows 10 has a native version of OpenSSH built-in.

It's not surprising, as SSH solves the problem that made Telnet so dangerous. SSH encrypts the connection between two or more computers, which means that even if an attacker manages to tap into the connection, they won't be able to make sense of it.

OpenSSH homepage

Even as useful as SSH is, like Telnet, the main technical assumptions of its development meant that the later network deployments expose its deficiencies. SSH assumes the use of wired, always-on connections. Try closing your laptop lid when you're connected and see what happens. Your SSH connection will freeze.

Another project, Mosh, arose to fix the problems of using SSH on laptops, mobile devices, and wireless connections. Mosh lets you stay connected even if a Wi-Fi network cuts out, and lets you roam between different networks efficiently.

Related: Get Better Remote Sessions on Linux With Mosh and Tmux

Log In to Remote Servers Safely

With SSH and Mosh, you can ditch Telnet entirely, keeping your login information safe while you access remote computers. To ensure your privacy online, you should be aware of the limitations of every technology or software that you use.

Even SSH isn't an exception. Knowing what the technology is and how attackers can use it against you will help protect your digital security.