当前位置:网站首页>xshell连接服务器把密钥登陆改为密码登陆
xshell连接服务器把密钥登陆改为密码登陆
2022-07-07 11:28:00 【荒-漠】
前提:
腾讯云服务器重装了新的系统,从windows变成CentOS 7.6 在使用xshell登录的时候发现密码登陆变成了密钥登陆。

解决办法:
先登陆腾讯云找到自己的云服务器 一般都有直接免密登陆或者用密码登陆(阿里云同理)

使用免密登陆之后,我们去修改一下系统配置文件中的登陆验证方式
修改 SSH 配置
- 首先先去登陆上服务器。
- 执行以下命令,打开
sshd_config配置文件。sudo vi /etc/ssh/sshd_config - 按 i 切换至编辑模式,找到
#Authentication,将PasswordAuthentication参数修改为 yes。如下图所示:说明:若
sshd_config配置文件中无此配置项,则添加PasswordAuthentication yes项即可。
执行以下命令,重启 ssh 服务。本文以 CentOS 7 为例,请根据您实际使用的操作系统执行命令。-
重启后,您可尝试使用密码进行登录。sudo systemctl restart sshd
边栏推荐
猜你喜欢

Practical example of propeller easydl: automatic scratch recognition of industrial parts

10 张图打开 CPU 缓存一致性的大门

COSCon'22 社区召集令来啦!Open the World,邀请所有社区一起拥抱开源,打开新世界~
![Scripy tutorial classic practice [New Concept English]](/img/bc/f1ef8b6de6bfb6afcdfb0d45541c72.png)
Scripy tutorial classic practice [New Concept English]

Go language learning notes - structure

分布式事务解决方案

JS缓动动画原理教学(超细节)

Milkdown 控件图标

LIS 最长上升子序列问题(动态规划、贪心+二分)

“新红旗杯”桌面应用创意大赛2022
随机推荐
High end for 8 years, how is Yadi now?
File operation command
Cinnamon Applet 入门
“新红旗杯”桌面应用创意大赛2022
聊聊伪共享
DETR介绍
Practical case: using MYCAT to realize read-write separation of MySQL
如何让join跑得更快?
工具箱之 IKVM.NET 项目新进展
OSI seven layer model
单片机学习笔记之点亮led 灯
单片机原理期末复习笔记
Go语言学习笔记-结构体(Struct)
LED light of single chip microcomputer learning notes
. Net ultimate productivity of efcore sub table sub database fully automated migration codefirst
Go language learning notes - structure
Digital IC Design SPI
Why can basic data types call methods in JS
MongoDB的用户管理总结
JNA学习笔记一:概念