su

yum install openssh-server

1>查看运行状态
To check if it is installed and running use the following command:
/sbin/service sshd status

2>启动ssh server
If the service is installed, but not running, it can be started either from the command-line:
/sbin/service sshd start

3>配置ssh
打开/etc/ssh/ssh_config ,去掉其中:
Port 22
Protocol 2,1
前面的#号,然后重新启动:service sshd restart

4>配置开机自动启动SSH服务:
vi /etc/rc.local
加入
/etc/init.d/sshd start
听说除了tomcat,其他的只要把启动参数写入rc.local就好

5>最后需要设置一下防火墙,允许ssh端口被访问:
iptables -I INPUT -p tcp -j ACCEPT
然后就可以通过ssh工具连接了
或者在图形界面下对防火
进行配置,启动防火配置:
/usr/bin/system-config-firewall

6>其它
另外fedora与debain和unbutu一样,也可以通过下面命令进行启动与关闭:
/etc/init.d/sshd stop
/etc/init.d/sshd start
/etc/init.d/sshd restart


/etc/init.d/iptables stop
/etc/init.d/iptables start
chkconfig sshd on

 

arrow
arrow
    全站熱搜

    Neo Chao 發表在 痞客邦 留言(0) 人氣()