# yum install pam-devel
Zlib
# tar xzvf zlib-1.2.3.tar.gz
# cd zlib-1.2.3
# ./configure --prefix=/usr/local/zlib
# make
# make install
OpenSSL
# tar xzvf openssl-0.9.8d.tar.gz
# cd openssl-0.9.8d
# ./Configure
# ./conifg --prefix=/usr/local/openssl
# make
# make test
# make install
OpenSSH
# tar xzvf openssh-4.5p1.tar.gz
# cd openssh-4.5p1
# ./configure --prefix=/usr --sysconfdir=/etc/ssh \
--with-pam --with-zlib=/usr/local/zlib \
--with-ssl-dir=/usr/local/openssl --with-md5-passwords
# make
# make install
更改配置文件 sshd_config
# vi /etc/ssh/sshd_config
X11Forwarding no
Protocol 2
# cd contrib/redhat
# cp sshd.init /etc/init.d/sshd
# chmod +x /etc/init.d/sshd
# chkconfig --add sshd
验证方法
# ssh -V
时间: 2024-11-23 23:08:18