Tips to Configure and Turn on SSH on Debian 11 Bullseye Linux

Tips to Configure and Turn on SSH on Debian 11 Bullseye Linux

Hello Geeky, so today we are focusing on How to Configure and Turn on SSH on Debian 11 Bullseye Linux. So please read this tutorial carefully so you may comprehend it in a better helpful way.

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

This tutorial exercise says the best way to install and set up an SSH server in Debian 11, so customers can integrate from a distance without a password via authentication keys. SSH, represented by Shell Secure, is a corporate platform for remote access and data transfer. OpenSSH (otherwise known as OpenBSD Secure Shell) is a fork of SSH available in Linux, macOS, and its own Windows stores.

Activate SSH on Debian

To install and activate SSH on Debian complete the following steps: Open your terminal update to your Debian system:

$ sudo apt update

The SSH server is not installed by default on the Debian system. To install, use the openssh-server package, which is available in the Debian repository. To install SSH, click:

$ sudo apt install openssh-server

Enter the sudo user password when ready and press Y to proceed with the installation. Confirm the installation by performing the following command:

$ sudo systemctl ipo ssh

The SSH service will automatically start and open (running) to confirm. Press q to exit, return to the shell. In case it does not start, use the following command to start the ssh function:

$ sudo systemctl start ssh

To activate the ssh function on the system boot, click:

$ sudo systemctl activates ssh

Find your server IP You can use different methods to find your Linux system of designated IP addresses. You can simply grant the following command to obtain your server IP address:

$ ip a

1: lo: mtu 65536 qdisc noqueue state UNKNOWN default group qlen 1000 link / loopback 00: 00: 00: 00: 00: 00 brd 00: 00: 00: 00: 00: 00: 00 inet 127.0.0.1 / 8 ft war is useful. Forever prefer_lft Forever inet6 :: 1/128 scope host valid_lft Forever Prefer_lft 2: eth0: mtu 1500 qdisc mq state UP default group qlen 1000 link / ether f2: 3c: 92: e8: 9f: cc brd ff: ff: ff: ff: ff: ff: ff inet 192.168.0.64/24 brd 192.168.0.255 scope global dynamic eth0 validsec_lft 489270et inet 6.: 3c02 :: f03c: 92ff: fee8: 9fcc / 64 expires global dynamic mngtmpaddr noprefixroute valid_lft 2592000sec prefer_lft 604800sec inet6 fe80 :: f03c: 92ff: fee8: 9fcc / 64 expires valid link

As a result, you can see that the system IP address is 192.168.0.64.

Connect to your server using SSH

By default, all Linux distributions have ssh client installed. This allows the client to connect to the server using ssh. Use the following ssh command to login to the device remotely:

ssh linoxide @ 192.168.0.64

Result:

The fact that the host ‘192.168.0.64 (192.168.0.64)’ could not be established. The ECDSA key fingerprint is SHA256: kuEUb8Lpus1yPuKJ6fm8s9E8x61wGv1u6U2OhEb3Ubc. Are you sure you want to continue connecting (yes / no /)[fingerprint])? Y

This message is available when you connect to a remote server for the first time. Click yes to continue.

Warning: Added ‘192.168.0.64’ (ECDSA) to the list of known hosts. linoxide@192.168.0.64 password:

Enter your user password to login. You receive the next default welcome message via a shell patent. Great you have logged in securely to Debian.

Linux debian-host-01 5.10.0-8-amd64 # 1 SMP Debian 5.10.46-4 (2021-08-03) x86_6 Programs included with Debian GNU / Linux system are free software; the exact distribution rules for each program are described in individual files in / usr / share / doc / * / command-on. Debian GNU / Linux comes with a WARRANTY, to a minimum

Firewall Settings

UFW is a popular user interface to iptables firewall. UFW is not installed by default on Debian.

To install ufw on Debian, click:

$ sudo apt install ufw

By default, UFW is configured to reject all incoming links and allow all outgoing links. Before activating UFW, enable ssh otherwise it will reject incoming links. By default SSH daemon use port 22. For security enhancement, you can change the default port or set it up forwarding port.

To allow 22 ports using ufw, press:

$ sudo ufw alive 22

To activate UFW, click:

$ sudo ufw works

Firewall is working now, with firewall rules to allow SSH connections.

Turn off SSH

You can simply stop the ssh function to remove SSH on Debian.

$ sudo systemctl duro ssh

To remove ssh from boot system, click:

$ sudo systemctl activates ssh

Faq

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


In this guide, we told you about the How to Configure and Turn on SSH on Debian 11 Bullseye Linux; please read all steps above so that you understand How to Configure and Turn on SSH on Debian 11 Bullseye Linux in case if you need any assistance from us, then contact us.

How this tutorial or guide assisting you?


So in this guide, we discuss the How to Configure and Turn on SSH on Debian 11 Bullseye Linux, which undoubtedly benefits you.



Final note

I hope you like the guide How to Configure and Turn on SSH on Debian 11 Bullseye Linux. In case if you have any queries regards this article/tutorial you may ask us. Also, please share your love by sharing this article with your friends and family.

Trickbugs: Get the latest Trick and Tips
Logo
Enable registration in settings - general