1.新建用户wwweee000 [root@localhost ~]# useradd wwweee000 [root@localhost ~]# passwd wwweee000 Changing password for user wwweee000. New password: BAD PASSWORD: The password is a palindrome Retype new password: passwd: all authentication tokens updated s…
在etc的sshd_config文件中,默认有PermitRootLogin no的配置,这个的意思是禁止root用户登录,如果想要允许root登录,需要su root用户到sshd_config下进行修改,需要把PermitRootLogin no改成PermitRootLogin yes,修改完成之后,需要重新启动ssh服务才生效,重启命令如下: service sshd restart 一定要记得,需要重新启动服务才行,否则你的系统使用的就不是那个你编辑的那个ssh,也就没有效果.…
1,useradd xiaobingpasswd xiaobing (设置密码) 2,禁止root登陆,修改 /etc/ssh/sshd_configPermitRootLogin yes 改为 PermitRootLogin no systemctlrestart sshd 3,增加sudoer权限 4,vi /etc/sudoers增加: xiaobing ALL=(ALL) ALL…
因为使用pem登录有很多局限性,在此修改为用密码但不是root登录 1.关闭selinux(要重启) vi /etc/selinux/config SELINUX=disabled 2.重置root密码 sudo passwd root 3.添加用户.并添加到sudoer sudo useradd userName sudo passwd userName 然后:修改/etc/sudoers,讲root all那一行复制一下,讲这一行的开头root修改userName即可 4.修改配置.重启服务…
vim /etc/ssh/sshd_config PermitRootLogin yes => PermitRootLogin no systemctl restart sshd.service netstat -tulnp|grep sshd vim /etc/ssh/sshd_config Port => Port systemctl restart sshd.service netstat -tulnp|grep sshd vim /etc/ssh/sshd_config #Client…
源地址:http://blog.sina.com.cn/s/blog_6756f85201019zv7.html 第一步:用帐号登录mysql[root@CentOs5 ~]# mysql -u root 或 # mysql -uroot -p 第二步:改变用户数据库mysql> use mysqlReading table information for completion of table and column namesYou can turn off this feature to g…
# 1 打开系统的密码验证功能: vim /etc/ssh/sshd_config #允许使用密码登录(注释此行 就是允许证书登录) PasswordAuthentication yes # 2 打开root 远程登录功能: #允许root认证登录(no 禁止root登录,普通用户可以切换身份到root) PermitRootLogin yes # 3 重启系统sshd systemctl restart sshd 或者 /etc/init.d/sshd restart 3.设置免密登录 ssh…
CentOS ssh默认监听端口 22端口,允许root用户ssh登录.server投入生产后很有必要更改默认ssh监听端口和禁止root登录. 步骤1:确认安装有ssh包 [appuser@su172 ~]$ rpm -qa | egrep -i ssh openssh-server-5.3p1-114.el6_7.x86_64 openssh-5.3p1-114.el6_7.x86_64 libssh2-1.4.2-1.el6.x86_64 步骤2:可以进一步确认包的默认安装位置信息 app…
1. 完成ubuntu容器的建立,完成ssh端口映射 2. 进入portainer内容器的console界面完成如下修改 a 刷新安装源:apt-get update b 安装sshd:apt-get install -y openssh-server c 看需要安装vim:apt-get install -y vim d 修改文件允许root登录:/etc/ssh/sshd_config 1.  将PermitRootLogin的值从withoutPassword改为yes 2. 将UsePA…
linux最高权限用户root,默认可以直接登录sshd.为了提高服务器的安全度,需要对它进行禁止,使得攻击者无法通过暴力破解来获取root权限. 1,新建一个用户: #useradd xxx (xxx为你要新建的用户名) 2,为新用户设置密码: #passwd xxx (xxx为你要新建的用户名) 3,修改SSHD配置,禁止root直接登录 #vi /etc/ssh/sshd_config 查找“#PermitRootLogin yes”,将前面的“#”去掉,短尾“Yes”改为“No”,并保存…
linux安装ssh远程登录后,为了安全起见,修改默认的22端口号并禁止root用户直接通过ssh登录. 配置方法如下: 1.使用vi编辑器打开ssh配置文件 /etc/ssh/sshd_config [root@localhost ~]# vim /etc/ssh/sshd_config 2.Port 22 这一行默认是注释的(大约在13行处),取消注释或者添加一行 Port 新端口号,如配置新端口号为9999: #Port 22Port 9999 3.将PermitRootLogin改为no…
把ssh默认远程连接端口修改为3333 1.编辑防火墙配置: vi /etc/sysconfig/iptables 防火墙新增端口3333,方法如下: -A INPUT -m state --state NEW -m tcp -p tcp --dport -j ACCEPT 具体是这样做: ====================================================================== # Firewall configuration written…
Linux的默认管理员名即是root,只需要知道ROOT密码即可直接登录SSH.禁止Root从SSH直接登录可以提高服务器安全性.经过以下操作后即可实现.本文适用于CentOS.Debian等Linux系统. 新建用户 [root@CentOS ~]# useradd test 配置密码 #使用passwd命令即可给相应帐户设置或修改密码. [root@CentOS ~]# passwd test #根据图示,设置或修改密码需要填写两次,第二次为效验密码,输入完毕后请回车确认. Changing…
一.修改默认端口号 第一步: vi /etc/sysconfig/iptables 添加修改后的端口号的配置 -A INPUT -p tcp -m state --state NEW -m tcp --dport 22001 -j ACCEPT 本例中,使用22001端口 添加后保存配置并重启防火墙. service iptables save (保存防火墙配置)  ----此处貌似有问题,运行这个以后又恢复到修改前了.这个先不使用.service iptables restart (重启防火墙…
方法一 很多站长拥有linux主机,不管是虚拟机还是实体机,一般我们远程连接的时候,都是用的ssh(SecureShell建立在应用层和传输层基础上的安全协议). 它默认的端口22,默认使用root也是可以登录的.这样在互联网上就是很危险的事情了,我们只能通过改变它的默认端口(虽然还是会被端口扫描探查),禁用root登录,来相对地提高安全性. 1. 修改ssh默认端口 a.命令行临时修改 Linux下SSH默认的端口是22,为了安全考虑,现修改SSH的端口为1433,修改方法如下 : /usr/…
1.1 修改SSHD配置,禁止root远程登录 禁止登录之前先穿甲一个可以远程登录的普通用户,以免造成登录不了的情况 [root@jhkj66 ~]# useradd yw001 #创建用户 [root@jhkj66 ~]# passwd yw001 #设置密码 Changing password for user yw001. New password: #输入你的密码 Retype new password: #确认密码 passwd: all authentication tokens u…
在研究Linux安全的时候遇到一个问题,原本打算修改linux直接远程root登陆,修改为sshd的配置文件后 Nano /etc/ssh/sshd_config 把#PermitRootLogin yes 修改为PermitRootLogin no 修改完成后,保存退出 重启sshd service sshd restart 新建一个普通用户 Useradd unixbar Passwd unixbar 在securecrt远程工具中,使用普通用户登陆的时候,出现了 The server ha…
注意:在禁止root等前要建立一个用户用来远程登录,否则退出后无法通过远程登录服务器. 编辑 /etc/ssh/sshd_config 文件 更改参数 PermitRootLogin yes 为 PermitRootLogin no vi /etc/ssh/sshd_config PermitRootLogin no…
1,新建一个用户: #useradd xxx 2,为新用户设置密码: #passwd xxx 3,修改sshd配置文件 #vi /etc/ssh/sshd_config 查找“#PermitRootLogin yes”,将前面的“#”去掉,“Yes”改为“No”,并保存文件. 4,查找#Port 22字段删掉#,并将22改为其它端口号. 5,重启sshd服务 #service sshd restart…
Linux修改ssh端口22 vi /etc/ssh/ssh_config vi /etc/ssh/sshd_config 然后修改为port 8888 以root身份service sshd restart (redhat as3) 使用putty,端口8888 Linux下SSH默认的端口是22,为了安全考虑,现修改SSH的端口为1433,修改方法如下 : /usr/sbin/sshd -p 1433 为增强安全 先增加一个普通权限的用户: #useradd uploader #passwd…
CentOS默认不启用sudo,且可以直接用超级管理员身份登录服务器.ubuntu这方面做得比较好,为了安全,减小误操作带来的损失,还是推荐启用sudo. 1.添加sudo用户 执行 visudo 命令,找到: root ALL=(ALL) ALL 在下面增加:(注意,snsgou 是Linux新增的一个普通用户) snsgou ALL=(ALL) ALL 2.禁止root用户登录 编辑 /etc/ssh/sshd_config,将 PermitRootLogin yes 改为 PermitRo…
系统环境是CentOS 6.5, 介绍下PAM(Pluggable Authentication Modules)在ssh服务上的简单配置过程. 1.必须先添加普通用户,并属于wheel组:保证有除root之外的其它用户能登录到系统 !!!!!!! # useradd -g wheel admin # passwd admin 2.禁止root直接登录: # vim /etc/ssh/sshd_config 添加 UsePAM yes # vim /etc/pam.d/sshd 行首添加: au…
linux修改端口22vi /etc/ssh/sshd_config找到#port 22将前面的#去掉,然后修改端口 port 1234重启服务就OK了service sshd restart或/etc/init.d/ssh restart为增强安全先增加一个普通权限的用户,并设置密码useradd testpasswd test然后禁止ROOT远程SSH登录:vi /etc/ssh/sshd_config把其中的PermitRootLogin yes改为PermitRootLogin no重启…
Aix禁止root远程登录 aix用户扩展信息大都在/etc/security/user这个文本文件里.你可以修改: login=false 用户不能登录系统 rlogin=false 用户不能从远程登录系统 su=false     其他用户不能切换到该用户 如果有特殊需要,干脆使用smitty lockuser锁定指定用户即可 禁止telnet登录 smit chuser ->root ->User can login REMOTELY(rsh,tn,rlogin) =false 禁止ss…
Linux修改ssh端口22 vi /etc/ssh/ssh_config vi /etc/ssh/sshd_config 然后修改为port 8888 以root身份service sshd restart (redhat as3) 使用putty,端口8888 Linux下SSH默认的端口是22,为了安全考虑,现修改SSH的端口为1433,修改方法如下 : /usr/sbin/sshd -p 1433 为增强安全 先增加一个普通权限的用户: #useradd uploader #passwd…
Linux禁止root远程登录 ssh的修改vi /etc/ssh/sshd_config将默认的#PermitRootLogin yes去注释改为PermitRootLogin no service sshd restart; 来自为知笔记(Wiz)…
如下示例把SSH默认端口22改为122. 1 修改/etc/ssh/sshd_config文件 #Port #找到改行,如果还想继续使用该端口,可以把#去掉,如果使用新端口,可以默认不管 Port #下面添加这一行 2 修改SELinux 首先查看SELinux允许的端口 [root@vmtest01 ~]# semanage port -l | grep -i ssh ssh_port_t tcp 然后添加122端口到SELinux [root@vmtest01 ~]# semanage po…
https://www.cnblogs.com/jianz/p/7979250.html 一.添加和root权限一样的用户 1. adduser admin passwd  admin (修改密码) 然后输入密码   (密码简单了通不过) 系统提示输入确认密码后再输入一次.OK添加成功. 2.修改 /etc/sudoers 文件,找到下面一行,在root下面添加一行,如下所示: vim /etc/sudoers ## Allow root to run any commands anywhere…
Linux修改ssh端口22 vi /etc/ssh/ssh_config vi /etc/ssh/sshd_config 然后修改为port 8888 以root身份service sshd restart (redhat as3) 使用putty,端口8888 Linux下SSH默认的端口是22,为了安全考虑,现修改SSH的端口为1433,修改方法如下 : /usr/sbin/sshd -p 1433 为增强安全 先增加一个普通权限的用户: #useradd uploader #passwd…
Linux系统中,root用户几乎拥有所有的权限,远高于Windows系统中的administrator用户权限.一旦root用户信息被泄露,对于我们的服务器来说将是极为致命的威胁.所以禁止root用户通过ssh的方式进行远程登录,这样可以极大的提高服务器的安全性,即使是root用户密码泄露出去也能够保障服务器的安全. 首先创建一个wzb普通用户加入到相应的组 这里必须要新建一个用户,否则将会造成无法通过远程ssh登录服务器 # groupadd wzb # useradd -g wzb wzb…