首页 > 系统相关 >腾讯轻量服务器 安装ubuntu 开启root登录

腾讯轻量服务器 安装ubuntu 开启root登录

时间:2023-06-24 18:47:18浏览次数:39  
标签:sshd config ssh ubuntu 轻量 root

腾讯轻量服务器安装ubuntu后,系统的默认用户名是 ubuntu,并在安装过程中默认不设置 root 帐户和密码。 想要设置中开启允许 root 用户登录。具体操作步骤如下(照抄的腾讯帮助文档,整理以方便查阅): 1. 使用 ubuntu 帐户登录。 2. 执行以下命令,设置 root 密码 sudo passwd root

3. 执行以下命令,打开 sshd_config 配置文件

sudo vi /etc/ssh/sshd_config

4. 找到#Authentication

PermitRootLogin 参数修改为 yes,如果 PermitRootLogin 参数被注释,请去掉首行的注释符号(#

5. 依旧在 #Authentication

将 PasswordAuthentication 参数修改为 yes,若 sshd_config 配置文件中无此配置项,则添加 PasswordAuthentication yes 项即可

6. 保存/etc/ssh/sshd_config退出后,执行以下命令,重启 ssh 服务

sudo service ssh restart

 

标签:sshd,config,ssh,ubuntu,轻量,root
From: https://www.cnblogs.com/fanyann/p/17501466.html

相关文章

  • Ubuntu ARM如何使用undetected-chromedrive
    1.Chromium和Driver安装sudoaptupdate&&sudoaptinstallchromiumchromium-driver2.复制一份到当前用户目录cp/usr/bin/chromedriver/home/myuser/.local/share/undetected_chromedriver/chromedriver_copy 3.Python启动代码importundetected_chromedriver......
  • Ubuntu ARM版本如何使用selenium
    1.Python模块安装pipinstallseleniumpipinstallwebdriver-manager 2.Chromium和Driver安装sudoaptupdate&&sudoaptinstallchromiumchromium-driver 3.测试代码#selenium4importshutilfromseleniumimportwebdriverfromselenium.webdriver......
  • Ubuntu-Python创建虚拟环境
    要在Ubuntu上使用VSCode为Python创建一个虚拟环境,可以按照以下步骤进行:打开终端(Ctrl+Alt+T)。安装Python的虚拟环境工具(如果尚未安装):sudoaptinstallpython3-venv在终端中进入您希望创建虚拟环境的目录:cd/path/to/directory请将/path/to/direct......
  • Ubuntu添加新用户并授权root
    打开终端。您可以使用快捷键Ctrl+Alt+T来打开终端,或者在应用程序菜单中搜索"终端"并打开它。在终端中,输入以下命令以使用超级用户权限登录(您需要输入当前用户的密码):sudo-i输入以下命令来添加新用户,将newuser替换为您想要设置的实际用户名:addusernewuser按......
  • 甲骨文Ubuntu ARM安装桌面版
    1、更新系统aptupdate-y;aptupgrade-y2、安装桌面aptinstallubuntu-desktop-y安装桌面这个过程比较慢,2核12G耗时6分钟3、安装xrdpaptinstallxrdp-y3、添加用户、重启Xrdp、开机启动adduserxrdpssl-certsystemctlrestartxrdpsystemctlstatusxrdp......
  • Ubuntu提示【Authentication is required to create a color profile/managed device
    1.安装vimaptinstallvim-y2.修改文件 vim/etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla3.粘贴以下内容[AllowColordallUsers]Identity=unix-user:*Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-......
  • CMake Error at /root/anaconda3/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:9 (mess
     001、问题CMakeErrorat/root/anaconda3/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:9(message):  Failedtofi 002、报错原因centos中没有安装opengl,安装opengl[[email protected]]#yum-yinstallmesa*freeglut*GLEW 003、再次编译[root......
  • -- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the sys
     系统是centos7.6001、问题--CouldNOTfindOpenSSL,trytosetthepathtoOpenSSLrootfolderinthesystemvari 002、解决方法[[email protected]]#yum-yinstallopensslopenssl-devel 003、再次编译(刚才的报错解决)。  ......
  • 轻量级的深度学习框架Tinygrad
    Tinygrad是一个轻量级的深度学习库,它提供了一种简化和直观的方法来理解和实现神经网络。在本文中,我们将探讨Tinygrad及其主要功能,以及它如何成为那些开始深度学习之旅的人的有价值的工具。 https://avoid.overfit.cn/post/33edc61f5a414cefa4431bf8dd904b24......
  • ubuntu apt源配置
    cd/etc/aptvi sources.listdebhttp://mirrors.aliyun.com/ubuntu/trustymainmultiverserestricteduniversedebhttp://mirrors.aliyun.com/ubuntu/trusty-backportsmainmultiverserestricteduniversedebhttp://mirrors.aliyun.com/ubuntu/trusty-proposedmai......