更改root用户不能直接限制root远程登录录问题

ssh禁止root用户远程登录
阅读:5051次&&&时间: 11:49:01&&
linux系统中root用户无所不能,为了系统安全ssh禁止root用户远程登录,必要的话使用sudo机制也是不错的选择编辑 /etc/ssh/sshd_config修改 PermitRootLogin将yes改为no重启ssh服务service sshd restart 或/etc/init.d/sshd restart
[商业源码]&
[商业源码]&
[商业源码]&
[商业源码]&
[商业源码]&
[商业源码]&
[商业源码]&
[商业源码]&
[商业源码]&
[商业源码]&
Copyright &
All Rights Reserved如何让的用户支持远程访问
1。改表法。可能是你的帐号不允许从远程登陆,只能在。这个时候只要在localhost的那台电 脑,登入mysql后,更改 "mysql" 里的 "user" 表里的 "host" 项,从"localhost"改称"%" mysql -u root -pvmwaremysql&mysql& user set host = '%' where user = 'root';2. 授权法。例如,你想myuser使用mypassword从任何主机连接到mysql的话。 GRANT ALL PRIVILEGES>'root'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTIONlinux 服务器禁止root用户的远程直接登录,并且系应该ssh的默认端口_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
linux 服务器禁止root用户的远程直接登录,并且系应该ssh的默认端口
||文档简介
嵌入式系统工程师|
总评分1.0|
浏览量1641
&&l​i​n​u​x​服​务​器​安​全​,​禁​止​r​o​o​t​用​户​直​接​用​s​s​h​登​录​,​并​且​修​改​默​认​端​口​号
阅读已结束,如果下载本文需要使用1下载券
想免费下载本文?
你可能喜欢MySQL(2)
环境:Ubuntu 12.04 LTS
允许 MySQL 以 root 用户远程登陆
初始情况下,是这样的
$ mysql -u root -h 10.10.10.3 -p
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on '10.10.10.3' (111)
If the server was started with --skip-networking, it will not accept TCP/IP connections at all. If the server was started with --bind-address=127.0.0.1, it will listen for TCP/IP connections only locally on the loopback interface and will not accept remote
connections.
修改 /etc/f:
bind-address
= 127.0.0.1
bind-address
修改完之后,还是连接不上:
$ mysql -u root -h 10.10.10.3 -p
Enter password:
ERROR 1130 (HY000): Host 'ubuntu2.novalocal' is not allowed to connect to this MySQL server
mysql& GRANT ALL ON *.* TO 'root'@'%' IDENTIFIED BY '&password_for_root&';现在就可以连接上了!
关于 MySQL 的链接方式
A MySQL client on Unix can connect to the mysqld server in two different ways: By using a Unix socket file to connect through a file in the file system (default /tmp/mysql.sock), or by using TCP/IP, which connects through a port number. A Unix socket file
connection is faster than TCP/IP, but can be used only when connecting to a server on the same computer. A Unix socket file is used if you do not specify a host name or if you specify the special host name localhost.
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:375825次
积分:6037
积分:6037
排名:第2684名
原创:242篇
转载:25篇
评论:18条
(1)(3)(2)(2)(4)(1)(1)(3)(1)(1)(2)(3)(3)(9)(9)(1)(4)(2)(4)(1)(11)(16)(3)(1)(2)(3)(2)(23)(4)(3)(12)(24)(10)(14)(3)(15)(3)(3)(2)(1)(23)(23)(9)博客访问: 965465
博文数量: 276
注册时间:
认证徽章:
IT168企业级官微
微信号:IT168qiye
系统架构师大会
微信号:SACC2013
分类: Linux
由于安全原因,Solaris 10禁止root用户直接使用ssh远程登陆。可以先用非root的帐户,登陆到ssh后,su成为root。如果想直接用root登陆,则修改如下配置文件:vi /etc/ssh/sshd_config&找到其中的如下一行,将前边的#符号去掉,并修改no为yes#PermitRootLogin no&改成:PermitRootLogin yes&重新启动SSH服务:# svcadm restart ssh&#&重新启动完成后,ssh即可登陆。
阅读(4123) | 评论(0) | 转发(0) |
相关热门文章
给主人留下些什么吧!~~
请登录后评论。}

我要回帖

更多关于 root用户不能远程登录 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信