需要操作以下流程,
1. vi /etc/ssh/sshd_config
将
PermitRootLogin without-password
改为
PermitRootLogin yes
2.执行/etc/init.d/ssh restart...
分类:
系统相关 时间:
2015-01-02 21:11:06
阅读次数:
228
可以从以下几个方面检查
1
vi /etc/ssh/sshd_config:
然后将这两项的注释号去掉
Port 22
Protocol 2
2
检查sshd服务
sudo service ssh status.
3
检查名字是否一致
/etc/hostname, and /etc/hosts.
4
检查防火墙.
sudo service ufw stat...
分类:
系统相关 时间:
2014-12-26 20:18:39
阅读次数:
264
一:修改ssh默认端口号vi /etc/ssh/sshd_config二|、Ubuntu 重启ssh/etc/init.d/ssh startlinux重启service sshd reload三:ssh是否开启(如果没有,前前面那篇文章)ps -e |grep ssh
分类:
系统相关 时间:
2014-12-26 18:21:54
阅读次数:
262
useraddusername;passwdusernamevi/etc/ssh/sshd_config#Authentication:#LoginGraceTime2m#PermitRootLoginno#StrictModesyes#MaxAuthTries6#MaxSessions10AllowUsersroot@x.x.x.xAllowUsersusername@*servicesshdrestart
分类:
其他好文 时间:
2014-12-26 14:51:17
阅读次数:
126
一、ansible安装1、安装第三方epel源centos5的epel#rpm-ivhhttp://mirrors.sohu.com/fedora-epel/5/x86_64/epel-release-5-4.noarch.rpmcentos6的epel#rpm-ivhhttp://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm查看系统版本#cat/etc/issueCentOSrelea..
分类:
其他好文 时间:
2014-12-25 06:44:08
阅读次数:
598
原文:http://www.weiguda.com/blog/41/当我们设置服务器时, 不应该每次都使用ssh登录服务器, 再按照记忆一步一步的配置. 因为这样实在是太容易忘记某些步骤了.服务器设置应当自动化, 并写成文档. 在django用户中, Ansible, SaltStack, Pupp...
分类:
其他好文 时间:
2014-12-23 23:57:49
阅读次数:
378
1:防火墙端口开放#/sbin/iptables-IINPUT-ptcp--dport2222-jACCEPT2:配置sshd_config文件,修改端口号#vi/etc/ssh/sshd_config找到#Port22将其改成Port22223:重启SSH服务#servicesshdrestart4:防火墙端口关闭#vi/etc/sysconfig/iptables找到-AINPUT-mstate--stateNEW-mtcp-..
分类:
其他好文 时间:
2014-12-23 10:40:05
阅读次数:
142
默认ssh端口为 22,总是被人扫描登录!
修改默认端口为2218的方法:
修改ssh配置文件 /etc/ssh/sshd_config,将里面的 Port 22前面的注释去掉,将22修改为 2218
[root@niche ~]# whereis ssh
ssh: /usr/bin/ssh /etc/ssh /usr/share/man/man1/ssh.1.gz
[root@...
分类:
其他好文 时间:
2014-12-19 00:42:09
阅读次数:
224
Ubuntu默认没有安装openssh-server包,故从远程计算机通过SSH连接时会收到Connection refused的消息。首先在Ubuntu检查/etc/ssh/sshd_config文件是否存在。cat /etc/ssh/sshd_configUbuntu默认情况下是不存在这个文件的...
分类:
系统相关 时间:
2014-12-17 00:11:06
阅读次数:
238