2012年7月9日 星期一
[轉貼]Fedora SSH安装与配置
「轉貼」Fedora SSH安裝與配置
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
原文出處
My Life Going By My Style
http://javaneo.pixnet.net/blog/post/29206928-fedora-15-ssh%E5%AE%89%E8%A3%85%E4%B8%8E%E9%85%8D%E7%BD% AE--
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言