


Install SSH on the Linux Debian11 server, create a new user and allow SSH remote login, and configure SSH secure login!
The steps to install SSH on a Debian 11 server and create a new user to allow SSH remote login are as follows:
Step 1: Install SSH
In order to install an SSH server, you need to be logged in to your Debian 11 server as root or a user with sudo privileges.
Execute the following command in the terminal to install the SSH server:
sudo apt update sudo apt install openssh-server
Step 2: Create a new user
To create a new user, you can use the adduser
command. Replace the following command with your desired username:
sudo adduser new_username
You will be prompted to set the new user's password and other details.
Step 3: Allow SSH remote login
By default, the SSH server installed on the Debian 11 server should allow remote login. However, to make sure it has been configured correctly, you can edit the SSH server configuration file.
Open the SSH configuration file using the following command:
sudo nano /etc/ssh/sshd_config
In the file, look for the following lines:
#PermitRootLogin yes
Change it to:
PermitRootLogin no
This will disable SSH logins using the root user. This is for added security. If you still want the root user to be able to log in remotely, change the above line back to PermitRootLogin yes
.
Step 4: Configure SSH secure login
You can further enhance the security of SSH by disabling password authentication and enabling public key authentication.
Find the following line:
#PasswordAuthentication yes
Change it to:
PasswordAuthentication no
This will disable password authentication. Then, find the following line:
#PubkeyAuthentication yes
Change it to:
PubkeyAuthentication yes
This will enable public key authentication.
Save and close the file.
Step 5: Restart the SSH service
After completing the above changes, you need to restart the SSH service for the changes to take effect.
Use the following command to restart the SSH service:
sudo systemctl restart ssh
现在,您应该能够使用新创建的用户通过SSH远程登录到您的Debian 11服务器了。
这些步骤提供了在Debian 11服务器上安装SSH,创建新用户并允许SSH远程登录以及进行SSH安全登录配置的指南。请确保按照步骤操作,并根据您的需求进行必要的修改。
The above is the detailed content of Install SSH on the Linux Debian11 server, create a new user and allow SSH remote login, and configure SSH secure login!. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Some players are experiencing a strange issue on PS4 or PS5 at launch. For example, this can cause distress when their PlayStation Network login fails, but their internet connection is fine. You may encounter errors when entering your login information and may not be able to join PSParty chat. If you encounter a similar problem, this guide may help you solve it. Next to PlayStationNetworkSign-in, you will see the error message ‘AnErrorHaveAreAre’ and it will say ‘Failure’. Other parameters like getting IP address, internet connection and connection speed were successful. So, what could be the problem here? I will give you a job

The AADSTS7000112 error may prevent you from logging into the app using your Microsoft account, causing you inconvenience. This article will provide you with solutions to help you resolve this issue and restore a normal login experience. Login: Sorry, you are having trouble logging in. AADSTS7000112: Application disabled. Fortunately, you can fix the error by following some simple suggestions. What is error code AADSTS7000112? Error code AADSTS7000112 indicates a problem with the connection to Microsoft's Azure Active Directory. Typically, this may be due to the Microsoft application trying to log in being blocked.
![Telnet in Windows 11 Complete Tutorial [Installation/Enablement and Troubleshooting]](https://img.php.cn/upload/article/000/000/164/168476253791019.jpg?x-oss-process=image/resize,m_fill,h_207,w_330)
<p>Telnet is the abbreviation of "Terminal Network". It is a protocol that users can use to connect one computer to a local computer. </p><p>Here, the local computer refers to the device that initiates the connection, and the computer connected to the local computer is called the remote computer. </p><p>Telnet runs on a client/server principal, and although it is outdated, it is still used by many people in 2022. Many people have already switched to Windows 11 operating system, which is the latest operating system offered by Microsoft. &

The sudo command allows users to run commands in elevated privilege mode without switching to superuser mode. This article will introduce how to simulate functions similar to sudo commands in Windows systems. What is the Shudao Command? Sudo (short for "superuser do") is a command-line tool that allows users of Unix-based operating systems such as Linux and MacOS to execute commands with elevated privileges typically held by administrators. Running SUDO commands in Windows 11/10 However, with the launch of the latest Windows 11 Insider preview version, Windows users can now experience this feature. This new feature enables users to

sudo (superuser execution) is a key command in Linux and Unix systems that allows ordinary users to run specific commands with root privileges. The function of sudo is mainly reflected in the following aspects: Providing permission control: sudo achieves strict control over system resources and sensitive operations by authorizing users to temporarily obtain superuser permissions. Ordinary users can only obtain temporary privileges through sudo when needed, and do not need to log in as superuser all the time. Improved security: By using sudo, you can avoid using the root account during routine operations. Using the root account for all operations may lead to unexpected system damage, as any mistaken or careless operation will have full permissions. and

On AlpineLinux, you can use the iptables tool to configure and manage firewall rules. Here are the basic steps to enable or disable the firewall on AlpineLinux: Check the firewall status: sudoiptables -L If the output shows rules (for example, there are some INPUT, OUTPUT, or FORWARD rules), the firewall is enabled. If the output is empty, the firewall is currently disabled. Enable firewall: sudoiptables-PINPUTACCEPTsudoiptables-POUTPUTACCEPTsudoiptables-PFORWARDAC

How to log in to the email address of Enterprise WeChat? You can log in to the email address in the Enterprise WeChat APP, but most users don’t know how to log in to the email address. Next is the graphic tutorial on how to log in to the email address of Enterprise WeChat brought by the editor for interested users. Come and take a look! Enterprise WeChat usage tutorial How to log in to the Enterprise WeChat email 1. First open the Enterprise WeChat APP, go to the [Workbench] at the bottom of the main page and click to come to the special area; 2. Then in the workbench area, select the [Enterprise Mailbox] service; 3. Then jump to the corporate email function page, click [Bind] or [Change Email] at the bottom; 4. Finally, enter [QQ Account] and [Password] on the page shown below to log in to the email.

With the development of cloud computing and the Internet of Things, remote operation of servers has become increasingly important. In Python, we can use the Paramiko module to easily implement SSH remote operations. In this article, we will introduce the basic usage of Paramiko and how to use Paramiko in Python to remotely manage servers. What is Paramiko Paramiko is a Python module for SSHv1 and SSHv2 that can be used to connect and control SSH clients
