当前位置:网站首页>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
边栏推荐
- 我那“不好惹”的00后下属:不差钱,怼领导,抵制加班
- Differences between MySQL storage engine MyISAM and InnoDB
- centso7 openssl 报错Verify return code: 20 (unable to get local issuer certificate)
- Read PG in data warehouse in one article_ stat
- shell 批量文件名(不含扩展名)小写改大写
- [QNX Hypervisor 2.2用户手册]6.3.4 虚拟寄存器(guest_shm.h)
- ESP32 ① 编译环境
- 自定义线程池拒绝策略
- 【学习笔记】线段树选做
- Smart cloud health listed: with a market value of HK $15billion, SIG Jingwei and Jingxin fund are shareholders
猜你喜欢
PACP学习笔记一:使用 PCAP 编程
人均瑞数系列,瑞数 4 代 JS 逆向分析
OSI 七层模型
error LNK2019: 无法解析的外部符号
Vscade editor esp32 header file wavy line does not jump completely solved
Cloud detection 2020: self attention generation countermeasure network for cloud detection in high-resolution remote sensing images
Go language learning notes - structure
《开源圆桌派》第十一期“冰与火之歌”——如何平衡开源与安全间的天然矛盾?
基于鲲鹏原生安全,打造安全可信的计算平台
将数学公式在el-table里面展示出来
随机推荐
Esp32 series column
Vscade editor esp32 header file wavy line does not jump completely solved
Milkdown 控件图标
Some principles of mongodb optimization
MongoDB内部的存储原理
Storage principle inside mongodb
Cinnamon Applet 入门
共创软硬件协同生态:Graphcore IPU与百度飞桨的“联合提交”亮相MLPerf
Common text processing tools
MongoDB的用户管理总结
Shortcut key of Bash
“新红旗杯”桌面应用创意大赛2022
RealBasicVSR测试图片、视频
Pcap learning notes II: pcap4j source code Notes
MATLAB中polarscatter函数使用
[untitled]
DrawerLayout禁止侧滑显示
测试下摘要
Esp32 ① compilation environment
PACP学习笔记一:使用 PCAP 编程