How to Configure and Turn on SSH on Debian 11 Bullseye Linux – Guide

This tutorial exercise shows how to install and organize the SSH server on Debian 11, so that clients can remotely join without password by verification keys. SSH, representing Secure Shell, is an organization’s convention for remote login and information movement. OpenSSH (also known as OpenBSD Secure Shell) is an SSH fork that can be accessed from the Linux, macOS and Windows warehouses themselves.

Enable SSH on Debian

sudo apt-get update sudo apt-get install ssh

sudo apt-get install ssh

sudo apt-get update sudo apt-get upgrade When prompted, enter your sudo user password and press Enter. If the installation was successful, you will be prompted to enter your Y key to continue. If the installation was not successful, you will be prompted to enter your Y key and a list of possible reasons why the installation failed will be displayed. ..

ssh -sS –config=/etc/ssh/ssh_config

sudo systemctl enable ssh To disable the ssh service at system shutdown, type: sudo systemctl disable ssh ..

ip addr show If you are using a DHCP server, you can also use the dhcpcd command to get your server’s IP address.

The system is located at 192.168.0.64 and is using the IP address 192.168.0.64. ..

lo: Local Loopback Interface mtu: 1500 qdisc: noqueue UNKNOWN state qlen: 1000 link / loopback group default 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 host scope lovalid_lft forever preferred_lft foreverinet6 :: 1/128 scope hostvalid_lft forever preferred_lft forever

Connect to your server using SSH

ssh -L 10.0.0.1:22

This message is displayed when you first connect to the remote host. ..

Welcome to Debian! To continue using Debian, you will need to provide a user password. To login, enter your user password at the shell prompt.

firewall settings

UFW is a user-friendly interface for iptables firewall that can be used to configure and manage your firewall. UFW is not installed by default on Debian, but can be easily installed using the aptitude package manager.

sudo apt-get install ufw

To enable UFW, you must first enable ssh. If you do not have ssh enabled, your computer will not be able to connect to the internet and you will not be able to access your files.

sudo ufw allow 22

UFW is a system that allows users to protect their computer from unauthorized access.

The firewall is now active, and a firewall rule has been added to allow SSH connections.

Disable SSH

To disable SSH in Debian, you can use the following command: sudo apt-get remove ssh

sudo systemctl disable ssh To enable ssh at system startup, type: sudo systemctl enable ssh ..

Final note

This guide will show you how to configure and turn on SSH on Debian 11 Bullseye Linux. If you have any questions about this article, please feel free to ask us in the comments below. Additionally, please share this guide with your friends if you enjoyed it! ..