当前位置:网站首页>初次使用腾讯云,解决只能使用webshell连接,不能使用ssh连接。
初次使用腾讯云,解决只能使用webshell连接,不能使用ssh连接。
2022-07-05 12:42:00 【No Bug】
Ubuntu 系统如何使用 root 用户登录实例?
Ubuntu 系统的默认用户名是 ubuntu,并在安装过程中默认不设置 root 帐户和密码。您如有需要,可在设置中开启允许 root 用户登录。具体操作步骤如下:
- 使用 ubuntu 帐户登录轻量应用服务器。
- 执行以下命令,设置 root 密码。
sudo passwd root - 输入 root 的密码,按 Enter。
- 重复输入 root 的密码,按 Enter。
返回如下信息,即表示 root 密码设置成功。passwd: password updated successfully - 执行以下命令,打开
sshd_config配置文件。sudo vi /etc/ssh/sshd_config - 按 i 切换至编辑模式,找到
#Authentication,将PermitRootLogin参数修改为yes。如果PermitRootLogin参数被注释,请去掉首行的注释符号(#)。如下图所示:
- 找到
#Authentication,将PasswordAuthentication参数修改为 yes。如下图所示:说明
若
sshd_config配置文件中无此配置项,则添加PasswordAuthentication yes项即可。
- 按 Esc,输入 :wq,保存文件并返回。
- 执行以下命令,重启 ssh 服务。
sudo service ssh restart - 参考 使用远程登录软件登录 Linux 实例 ,并使用以下信息登录 Ubuntu 轻量应用服务器:
- 用户名:root
- 登录密码:在 步骤2 中已设置的密码
以上是腾讯云的官方文档。这里少强调了一个地方,就是PasswordAuthentication yes,这里默认是(#PasswordAuthentication prohit password)需要去掉注释# 然后改成 PasswordAuthentication yes

这样就可以远程ssh登录了。
边栏推荐
- 函数的默认参数&函数参数的多种方法
- RHCSA4
- Kotlin process control and circulation
- Transactions on December 23, 2021
- Natural language processing from Xiaobai to proficient (4): using machine learning to classify Chinese email content
- RHCAS6
- Comprehensive upgrade of Taobao short video photosynthetic platform
- I met Tencent in the morning and took out 38K, which showed me the basic smallpox
- Lepton 无损压缩原理及性能分析
- Introduction aux contrôles de la page dynamique SAP ui5
猜你喜欢

Principle and performance analysis of lepton lossless compression

Taobao order interface | order flag remarks, may be the most stable and easy-to-use interface

阿里云SLB负载均衡产品基本概念与购买流程

SAP SEGW 事物码里的 Association 建模方式

Distance measuring sensor chip 4530a used in home intelligent lighting

OpenHarmony应用开发之Navigation组件详解

LeetCode20.有效的括号

Setting up sqli lab environment

Talk about my drawing skills in my writing career

Tips and tricks of image segmentation summarized from 39 Kabul competitions
随机推荐
《2022年中国银行业RPA供应商实力矩阵分析》研究报告正式启动
Taobao flag insertion remarks | logistics delivery interface
Concurrent performance test of SAP Spartacus with JMeter
Why is your next computer a computer? Explore different remote operations
#yyds干货盘点# 解决名企真题:搬圆桌
From the perspective of technology and risk control, it is analyzed that wechat Alipay restricts the remote collection of personal collection code
SAP SEGW 事物码里的导航属性(Navigation Property) 和 EntitySet 使用方法
谈谈我写作生涯的画图技巧
SAP UI5 视图里的 OverflowToolbar 控件
NLP engineer learning summary and index
解决 UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0xa2 in position 107
从39个kaggle竞赛中总结出来的图像分割的Tips和Tricks
PyCharm安装第三方库图解
Run, open circuit
RHCSA2
OpenHarmony应用开发之Navigation组件详解
2021-12-21 transaction record
About LDA model
你的下一台电脑何必是电脑,探索不一样的远程操作
自然语言处理从小白到精通(四):用机器学习做中文邮件内容分类

