« 在postfix下编译安装amavisd-new+clamav+SpamAssassin | 首页 | vi的使用之汇总 »

May 19, 2006

openssh快速编译安装howto

我想当一个称职的linux管理员,openssh的升级一定很重要,毕竟现在telnet早就因为安全的问题被淘汰了,但现在系统自带的openssh有些版本也非常老,不少都有非常严重的漏洞,所以有必要告诉大家怎么在原有系统的基础上升级openssh

首先系统自带的openssh
rpm -qa |grep openssh
查到后,毫不犹豫的删除,一般都版本太老,有不少漏洞

然后到www.openssh.com下载最新的openssh,这次我编译的最新版本是OpenSSH_4.3p2.
下载解压后,用以下参数编译
./configure \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--sysconfdir=/etc/ssh \
--libexecdir=/usr/libexec/openssh \
--with-tcp-wrappers \
--with-rsh=/usr/bin/rsh \
--with-privsep-path=/var/empty/sshd \
--disable-strip \
--with-superuser-path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

make

make install

拷贝服务脚本
cp contrib/redhat/sshd.init /etc/rc.d/init.d/sshd

ok.安装很简单吧

然后编辑
vi /etc/ssh/sshd_config

PermitRootLogin no 限制root用户登陆

PasswordAuthentication no 因为我是用密匙登陆,所以这里取消用简单的密码登陆,大家可参考

linux下SSH配合SecureCRT的密匙完美使用方法
关于SecureCrt使用ssh2的补充

由 frank 发表于 May 19, 2006 2:53 PM

本网所有文章建立在 创作公用 协议下。版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及以上“创作共用”声明。

发表评论




是否保存个人讯息?