CentOS 5安装openssh
卸载现有的openssh
?
rpm -qa | grep openssh #列出要删除的rpm包
rpm -e x.rpm # 卸载
?
安装官方网站:www.openssh.com
?
wget http://openbsd.org.ar/pub/OpenBSD/OpenSSH/portable/openssh-5.9p1.tar.gz
tar -zxf?openssh-5.9p1.tar.gz && cd?openssh-5.9p1.tar.gz
./configure?
make
make install
?
配置#添加到service
cp contrib/redhat/sshd.init /etc/init.d/sshd
#开机启动服务
chkconfig --add sshd
chkconfig sshd on ?
?
测试
# 客户端测试
ssh??-v?
?
# 服务端测试
service sshd start?
?
检查端口
netstat?-tnlp?|?grep?:22
?
本机登录
ssh?root@localhost?
?
?
参考:
http://www.chinaunix.net/jh/29/922589.html