码迷,mamicode.com
首页 > 其他好文 > 详细

centos

时间:2014-05-09 04:25:47      阅读:287      评论:0      收藏:0      [点我收藏+]

标签:code   tar   c   art   line   a   

/etc/sysconfig/network-scripts/ifcfg-eth0

IPADDR=x.x.x.x

GATEWAY=y.y.y.y

NETMASK=x.x.x.x

yum -y install openssh-server openssh-clients

chkconfig sshd on

service sshd start

netstat -tulpn | grep :22

vi /etc/sysconfig/iptables

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT

If you want to restict access to 192.168.1.0/24, edit it as follows:
-A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 22 -j ACCEPT
If your site uses IPv6, and you are editing ip6tables, use the line:
-A RH-Firewall-1-INPUT -m tcp -p tcp --dport 22 -j ACCEPT

 service iptables restart

 

service iptables save
service iptables stop
chkconfig iptables off

visudo

an      ALL=(ALL)       ALL

yum install gcc gcc-c++

centos,布布扣,bubuko.com

centos

标签:code   tar   c   art   line   a   

原文地址:http://www.cnblogs.com/anjsxz/p/3716056.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!