当前位置:网站首页>初次使用腾讯云,解决只能使用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登录了。
边栏推荐
- Rocky基础知识1
- It's too convenient. You can complete the code release and approval by nailing it!
- Vonedao solves the problem of organizational development effectiveness
- Taobao order interface | order flag remarks, may be the most stable and easy-to-use interface
- A specific example of ABAP type and EDM type mapping in SAP segw transaction code
- 10 minute fitness method reading notes (5/5)
- Compilation principle reading notes (1/12)
- 百日完成国产数据库opengausss的开源任务--openGuass极简版3.0.0安装教程
- 激动人心!2022开放原子全球开源峰会报名火热开启!
- CVPR 2022 | single step 3D target recognizer based on sparse transformer
猜你喜欢

Taobao, pinduoduo, jd.com, Doudian order & Flag insertion remarks API solution

SAP ui5 objectpagelayout control usage sharing

leetcode:221. 最大正方形【dp状态转移的精髓】

Association modeling method in SAP segw transaction code

Research: data security tools cannot resist blackmail software in 60% of cases

HiEngine:可媲美本地的云原生内存数据库引擎

Taobao short video, why the worse the effect

Comprehensive upgrade of Taobao short video photosynthetic platform

初识Linkerd项目

Pinduoduo flag insertion remarks API
随机推荐
It's too convenient. You can complete the code release and approval by nailing it!
Simply take stock reading notes (2/8)
Principle and performance analysis of lepton lossless compression
Taobao, pinduoduo, jd.com, Doudian order & Flag insertion remarks API solution
How to connect the API interface of Taobao open platform (super detailed)
Wechat enterprise payment to change access, open quickly
SAP self-development records user login logs and other information
RHCAS6
国内市场上的BI软件,到底有啥区别
Taobao order amount check error, avoid capital loss API
单独编译内核模块
Kotlin variable
从39个kaggle竞赛中总结出来的图像分割的Tips和Tricks
Pinduoduo flag insertion remarks API
Comprehensive upgrade of Taobao short video photosynthetic platform
Didi open source Delta: AI developers can easily train natural language models
Why is your next computer a computer? Explore different remote operations
Research: data security tools cannot resist blackmail software in 60% of cases
Discussion on error messages and API versions of SAP ui5 getsaplogonlanguage is not a function
stm32和电机开发(从架构图到文档编写)

