教学文章
Technology Exchange
热门课程
400电话

免费咨询热线
400-090-9964

教学文章

安装Opengauss,设置root用户远程登录

时间:2020-08-17 来源:

root用户远程登录

在openGauss安装时需要root帐户远程登录访问权限,本章介绍如何设置使用root用户远程登录。

修改PermitRootLogin配置,允许用户远程登录。

打开sshd_config文件。

vim /etc/ssh/sshd_config

修改权限配置,可以使用以下两种方式实现:

注释掉“PermitRootLogin no”。

#PermitRootLogin no

将“PermitRootLogin“改为“yes“。

PermitRootLogin yes

执行:wq保存并退出编辑页面。

修改Banner配置,去掉连接到系统时,系统提示的欢迎信息。欢迎信息会干扰安装时远程操作的返回结果,影响安装正常执行。

编辑sshd_config文件。

vim /etc/ssh/sshd_config

修改Banner配置,注释掉“Banner”所在的行。

#Banner /etc/ssh/welcome.msg

执行:wq保存并退出编辑页面。

使用如下命令使设置生效。

service sshd restart

注意:

若执行命令后返回提示信息“Redirecting to /bin/systemctl restart sshd.service”,请执行命令:/bin/systemctl restart sshd.service。

以root用户身份重新登录。

ssh xxx.xxx.xxx.xxx

说明:

xxx.xxx.xxx.xxx为安装openGauss环境的ip。

版权所有@北京神脑资讯技术有限公司(CUUG,中国UNIX用户协会) Copyright ALL Rights Reserved 京ICP备11008061号-1

CUUG旗下网站:www.cuug.com.cn www.cuug.com oracle.cuug.com bbs.cuug.com www.cuug.net

电话:010-59426307 010-59426319 邮政编码:100089

地址:北京市海淀区北清路164号28-38号院