Home > System Tutorial > LINUX > body text

Problems and solutions to the problem that SSH cannot connect when installing Ubuntu 22.04

王林
Release: 2024-02-29 10:58:21
forward
967 people have browsed it

php editor Banana discovered that the problem of being unable to connect after installing SSH in Ubuntu 22.04 has been bothering many users. In daily use, SSH connection is very important, so it is particularly critical to solve this problem in time. This article will introduce in detail the common reasons why SSH cannot connect when installing Ubuntu 22.04, and provide solutions to help you solve this problem smoothly.

1. Modify ssh configuration file

vim /etc/ssh/sshd_config
Copy after login

Turn on the PermitRootLogin annotation and change the value to yes

Problems and solutions to the problem that SSH cannot connect when installing Ubuntu 22.04

Save changes and exit

:wq
Copy after login

2. Restart the ssh service

sudo service ssh restart
Copy after login

3. Reopen the ssh client and connect. If you use an ssh client that has been opened before modifying the configuration, you cannot use the new ssh configuration.

Preset settings:

The above is the detailed content of Problems and solutions to the problem that SSH cannot connect when installing Ubuntu 22.04. For more information, please follow other related articles on the PHP Chinese website!

source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!