当前位置:网站首页>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
边栏推荐
- [untitled]
- QQ的药,腾讯的票
- [untitled]
- RecyclerView的数据刷新
- [QNX hypervisor 2.2 user manual]6.3.4 virtual register (guest_shm.h)
- Go language learning notes - structure
- [Presto profile series] timeline use
- Practical case: using MYCAT to realize read-write separation of MySQL
- 信号强度(RSSI)知识整理
- Pay close attention to the work of safety production and make every effort to ensure the safety of people's lives and property
猜你喜欢
Cinnamon Applet 入门
Vscade editor esp32 header file wavy line does not jump completely solved
聊聊伪共享
ESP32 ① 编译环境
[Presto profile series] timeline use
OSI 七层模型
COSCon'22 社区召集令来啦!Open the World,邀请所有社区一起拥抱开源,打开新世界~
“新红旗杯”桌面应用创意大赛2022
PAcP learning note 1: programming with pcap
共创软硬件协同生态:Graphcore IPU与百度飞桨的“联合提交”亮相MLPerf
随机推荐
Test next summary
Signal strength (RSSI) knowledge sorting
JS判断一个对象是否为空
MongoDB命令汇总
【学习笔记】AGC010
OSI seven layer model
人均瑞数系列,瑞数 4 代 JS 逆向分析
Vscade editor esp32 header file wavy line does not jump completely solved
OSI 七层模型
[learning notes] zkw segment tree
[untitled]
Vscode编辑器ESP32头文件波浪线不跳转彻底解决
JNA learning notes 1: Concepts
Write it down once Net a new energy system thread surge analysis
regular expression
飞桨EasyDL实操范例:工业零件划痕自动识别
将数学公式在el-table里面展示出来
Some principles of mongodb optimization
PCAP学习笔记二:pcap4j源码笔记
ESP32 ① 编译环境