Fedora 启动 SSH服务
一、Fedora 启动sshd服务:
1、先确认是否已安装ssh服务:
[root@localhost ~]# rpm -qa | grep openssh-server
openssh-server-5.3p1-19.fc12.i686 (这行表示已安装)
若未安装ssh服务,可输入:
#yum install openssh-server
进行安装
2、修改配置文件
#vi /etc/ssh/sshd_config
#Port 22 监听的端口号,默认是22,可以自定义。
#Protocol 2 支持的协议,默认就好,不用修改
#PermitRootLogin yes 是否允许root直接登录,最好设置为no
#MMaxAuthTries 6 最大登录数,默认是6,建议设置为3,防止别人密码穷举。
修改完配置后,重启SSH服务:
[root@localhost ~]# /etc/rc.d/init.d/sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]:
3、查看sshd状态:
#service sshd status
4、将端口22(或者自定义的其他端口)加到防火墙的设置中,标记为Accept
#iptables -A INPUT -p tcp --dport 22 -j ACCEPT
(这句很重要,不然外部连接不了。)
也可以将上述参数加入防火墙配置中:
#vi /etc/sysconfig/iptables
加入:-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
保存后重启iptables即可
详情可以查阅 iptables的用法
二、Fedora15/16/17 启动sshd服务:
由于Fedora 15/16使用systemd服务,
1、启动SSH服务与上面有些不同
# systemctl start sshd.service
或者 #service sshd start
也可以用 restart 和 stop控制sshd服务
2、设置系统启动时开启服务
# systemctl enable sshd.service
3、同样也需开启防火墙22端口
#iptables -A INPUT -p tcp --dport 22 -j ACCEPT
也可以将上述参数加入防火墙配置中:
#vi /etc/sysconfig/iptables
加入:-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
保存后重启iptables即可
详情可以查阅 iptables的用法
Fedora 启动 SSH服务的更多相关文章
- ubuntu 下安装和启动SSH 服务
安装OPENSSH 服务端 sudo apt-get install openssh-server 查看进程是否启动 ps -e | grep ssh 删除密钥文件 rm /etc/ssh/ssh_h ...
- Linux启动ssh服务
Linux启动ssh服务 在Linux下启动ssh服务使用如下命令其一即可: # service sshd start # /etc/init.d/sshd start 开机启动 使用如下方法其就可以 ...
- centos安装启动ssh服务
centos安装启动ssh服务 #rpm -qa |grep ssh 检查是否装了SSH包 没有的话yum install openssh-server #chkconfig --list sshd ...
- CentOS7启动SSH服务报:Job for ssh.service failed because the control process exited with error code
CentOS7启动SSH服务报:Job for ssh.service failed because the control process exited with error code....... ...
- Fedora 启动sshd服务:
.先确认是否已安装ssh服务: [root@localhost ~]# rpm -qa | grep openssh-server openssh-server-.3p1-.fc12.i686 (这行 ...
- [转]fedora启动telnet服务
http://blog.chinaunix.net/uid-22996709-id-3056078.html 在win7上安装了SecurityCRT,登录VMWARE Fedora时候登录超时,检查 ...
- 启动ssh服务 XSshell 生成秘钥 并注册公钥在Ubuntu linux
安装ssh服务:sudo apt-get install openssh-server 查看ssh服务: ps -ef | grep ssh 查看之后正常显示如下3行:root 8 ...
- solaris如何启动ssh服务
先查看一下ssh服务状态:# svcs或# svcs | grep sshonline Aug_07 svc:/network/ssh:default 如需要关闭ssh服务(关闭完可以 svcs | ...
- ubuntu16.04启动ssh服务
1 查看ssh服务是否开启 ps -e | grep ssh* 2如果没有则安装ssh apt-get install openssh-server openssh-client 3再看服务就有ssh ...
随机推荐
- 解决No Hibernate Session bound to thread, and configuration does not allow creat。。。
applicationContext.xml配置 <?xml version="1.0" encoding="UTF-8"?> <beans ...
- Problem E: Automatic Editing
Problem E: Automatic EditingTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 3 Solved: 3[Submit][Status ...
- 二分查找(Java)
二分查找的前提的要查找的数组必须有序. 代码如下: 程序1 public class source { public int binary_sort(int[] array, int item) { ...
- 转:什么是FOUC?如何避免FOUC?
今天了解了一个新的名词叫做 FOUC 浏览器样式闪烁,之前也听说过一些类似的东西,比如样式突变等等,但这东西竟然有学名的.. 什么是FOUC(文档样式短暂失效)?如果使用import方法对CSS进行导 ...
- ECMAScript 5中新增的数组方法
ECMAScript 5中定义了9个新的数组方法,用于遍历.映射.过滤.检测.简化和搜索数组. 在开始介绍之前,很有必要对这几个新增的数组方法做一个概述.首先,大多数方法的第一个参数接收一个函数,并且 ...
- Understanding and Selecting a SIEM/LM: Correlation and Alerting
Continuing our discussion of core SIEM and Log Management technology, we now move into event correla ...
- Nexus 5完全拆解
Nexus 5,由LG制造,配备高通骁龙四核处理器,4.95英寸1080P显示屏,支持4G LTE,运行最新的Android 4.4 KitKat原生操作系统.国外著名拆解网站iFixit第一时间带来 ...
- centos6.5 搭建php5.5+mysql5.5+apache2.4
本文总结了Linux下 root.常用查找命令.卸载软件方法(见二.安装PHP5.5).配置软件源(见二).安装软件(见二)与高版本替换软件(见三.安装MySQL)的方法. 迁移网站,机器上原本已有p ...
- Ghost.py 0.1b3 : Python Package Index
Ghost.py 0.1b3 : Python Package Index Ghost.py 0.1b3 Download Ghost.py-0.1b3.tar.gz Webkit based web ...
- I can do it!(贪心)
I can do it! Time Limit: 2000/2000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Tot ...