当前位置:网站首页>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
边栏推荐
猜你喜欢
About how appium closes apps (resolved)
PACP学习笔记一:使用 PCAP 编程
[learning notes] agc010
Coscon'22 community convening order is coming! Open the world, invite all communities to embrace open source and open a new world~
[untitled]
Isprs2021/ remote sensing image cloud detection: a geographic information driven method and a new large-scale remote sensing cloud / snow detection data set
Storage principle inside mongodb
单片机学习笔记之点亮led 灯
[untitled]
存储过程的介绍与基本使用
随机推荐
OSI seven layer model
MySQL master-slave replication
ORACLE进阶(五)SCHEMA解惑
将数学公式在el-table里面展示出来
[learning notes] segment tree selection
Digital IC Design SPI
MongoDB复制(副本集)总结
Smart cloud health listed: with a market value of HK $15billion, SIG Jingwei and Jingxin fund are shareholders
飞桨EasyDL实操范例:工业零件划痕自动识别
PAcP learning note 3: pcap method description
regular expression
MongoDB的导入导出、备份恢复总结
国泰君安证券开户怎么开的?开户安全吗?
LIS 最长上升子序列问题(动态规划、贪心+二分)
【学习笔记】zkw 线段树
error LNK2019: 无法解析的外部符号
DHCP 动态主机设置协议 分析
如何让electorn打开的新窗口在window任务栏上面
Esp32 ① compilation environment
The difference between cache and buffer