首页 > 其他 > 详细

centos

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

/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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!