当前位置:网站首页>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
边栏推荐
- Analysis of DHCP dynamic host setting protocol
- Ogre入门尝鲜
- Japanese government and enterprise employees got drunk and lost 460000 information USB flash drives. They publicly apologized and disclosed password rules
- 服务器到服务器 (S2S) 事件 (Adjust)
- Mongodb replication (replica set) summary
- 分布式事务解决方案
- Initialization script
- Milkdown 控件图标
- shell 批量文件名(不含扩展名)小写改大写
- Practical example of propeller easydl: automatic scratch recognition of industrial parts
猜你喜欢
PACP学习笔记一:使用 PCAP 编程
提升树莓派性能的方法
Digital IC Design SPI
[learning notes] agc010
Introduction and basic use of stored procedures
【Presto Profile系列】Timeline使用
飞桨EasyDL实操范例:工业零件划痕自动识别
高端了8年,雅迪如今怎么样?
Isprs2021/ remote sensing image cloud detection: a geographic information driven method and a new large-scale remote sensing cloud / snow detection data set
Coscon'22 community convening order is coming! Open the world, invite all communities to embrace open source and open a new world~
随机推荐
日本政企员工喝醉丢失46万信息U盘,公开道歉又透露密码规则
国泰君安证券开户怎么开的?开户安全吗?
[learning notes] zkw segment tree
How to continue after handling chain interruption / sub chain error removed from scheduling
JS缓动动画原理教学(超细节)
[untitled]
迅为iTOP-IMX6ULL开发板Pinctrl和GPIO子系统实验-修改设备树文件
Mongodb meets spark (for integration)
JS判断一个对象是否为空
shell 批量文件名(不含扩展名)小写改大写
Some principles of mongodb optimization
抓细抓实抓好安全生产各项工作 全力确保人民群众生命财产安全
靠卖概念上市,认养一头牛能走多远?
【学习笔记】线段树选做
MongoDB 遇见 spark(进行整合)
PACP学习笔记一:使用 PCAP 编程
Vscode编辑器ESP32头文件波浪线不跳转彻底解决
Realbasicvsr test pictures and videos
Introduce six open source protocols in detail (instructions for programmers)
为租客提供帮助