Debian is the most popular Linux distribution for hosting a website, making a media server, using as a desktop OS, and more services. If you are currently using a Debian desktop, you need to make your Debian desktop's terminal remote access grant for editing or configuring some issues with a remote client from another device. Secure Shell (SSH) is most useful for this. In this tutorial, we will set up SSH on a Debian desktop.

On Debian desktop, the most useful tool, Tasksel, is available inbuilt. In most cases, Tasksel is available before starting this installation process. We can show some basic information about what Secure Shell actually is.

What is SSH?

SSH is a protocol for sharing the command line interface remotely and doing anything from different devices. You can access your server from anywhere and any device. SSH stands for Secure Shell. It works over port 22 for both TCP and UDP. Port 22 is used for the secure connection.

You can access the SSH server from Windows, Linux, Mac, Android, and iOS devices with the help of SSH clients. You can host your Linux and Mac system over the SSH port. Now, we can try this on a Debian system in this tutorial.

Setup SSH on Debian

To make an SSH server on a Debian operating system is easy. You just need an internet connection on your device. First, you need the Tasksel tool.

Setup Tasksel on Debian

In most cases, Tasksel is installed by default. It's used when you install Debian. If in any case, you have lost Tasksel from your device, then input the given command to install Tasksel:

sudo apt install tasksel -y

After inputting this command, the Tasksel installation will start. Tasksel is used for installing web servers, desktop interfaces, and more services. It's a trusted tool because it's available inbuilt on the Debian installation section.

Install Secure Shell

Now we can start the SSH installation process. Go to the Debian desktop and run the terminal. On the terminal, input the given command to open Tasksel:

sudo tasksel
tasksel menu in terminal

Now you can see the service list like Install Gnome Desktop, Debian desktop, XFCE desktop, web server, and more. Move down the highlighter and select the SSH server option. Now click the Space key to select Secure Shell and show the icon, then hit the enter key to start the installation process. It will complete within a minute. If you are done, now we need to enable the firewall rule for this service. To do this, you need the UFW firewall tool. If you are done, input the given command to allow it:

sudo ufw allow "SSH"

Now our SSH server is ready. But how can we connect to the server? To connect to the server, we need the Internet Protocol Address. To check your IP address, input the given command:

ip a

Now you can see your public IP address in the format like 192.268.xx.x. Note down your IP address, and our host side configuration is completed. Now we can go to the remote side.

Connect to SSH

Connecting to the SSH server is easy. For doing this, you need software. If you are using a computer, then software is optional. You can continue with the CLI, but software makes it easy. Now we can do this on a Windows computer. For connecting to SSH, PuTTY software is the most popular tool for the Windows operating system. First, download and install PuTTY software and input the given information.

0:00
/0:17

Connect to SSH using Putty

On the host section, input your public IP address of your Debian server, then click on connect. It will ask for authentication. Continue with "y" to connect to your Secure Shell, and it will ask for your username and password to log in to your account. For Linux systems, use the SSH command in the terminal or on Windows, try Command Prompt or PowerShell to connect:

$ ssh username@ip_address

For connection, more software is available like MobaXterm and Termius. For Android and iOS, you can try with Termius software.

The link has been copied!