Telnet is not a secure protocol and is unencrypted. By monitoring a user's connection, anyone can access a person's username, password and other private information that is typed over the Telnet session in plaintext. With this information, access can be gained to the user's device
Some modern systems enable only command-line connections using Secure Shell (SSH), an encrypted tool similar to Telnet, or through a virtual private network (VPN). Because of security concerns, many professional organizations require use of SSH, PuTTy or other options instead of Telnet. SSH is the most commonly used alternative, largely because it encrypts all the traffic that passes over the communication channel.
The SSH protocol (also referred to as Secure Shell) is a method for secure remote login from one computer to another. It provides several alternative options for strong authentication, and it protects the communications security and integrity with strong encryption. It is a secure alternative to the non-protected login protocols (such as telnet, rlogin) and insecure file transfer methods (such as FTP).
The protocol is used in corporate networks for:
providing secure access for users and automated processes
interactive and automated file transfers
issuing remote commands
managing network infrastructure and other mission-critical system components.
Open the terminal and install the openssh-server package:
sudo apt update && sudo apt install openssh-server
Once the installation is complete, the SSH service will start automatically. You can verify that SSH is running by typing:
sudo systemctl status sshd
Make sure to open the SSH port using ufw
sudo ufw allow ssh
Then we SSH into our Ubuntu System from another Linux/Unix Based System or from the windows powershell.
ssh username@ip_address
The SCP (Secure Copy) command is a method of encrypting the transmission of files between Unix or Linux systems. It’s a safer variant of the cp (copy) command.
SCP includes encryption over an SSH (Secure Shell) connection. This ensures that even if the data is intercepted, it is protected.
The SCP utility can serve in the following use cases:
Copy files within the same machine.
Copy files from a local host to a remote host.
Copy files from a remote host to a local host.
Copy files between two different remote servers.
Syntax:
scp <-r> <file/folder from local/remote system> <file/folder from local/remote system>
Examples:
In this example, I am copying a file from my local system to my Ubuntu System over an SSH connection
You can even use Windows for transferring files to a Linux host