Linux下openssh升级
Linux下openssh升级 Linux下openssh升级
1:因为openssh需要openssl,所以先更新openssl,下载openssl,
http://www.openssl.org/source/
3459643 Sep 15 16:35:55 2008 openssl-0.9.8i.tar.gz (MD5) (SHA1) (PGP sign) [LATEST]
openssl-0.9.8i.tar.gz, 放到/home/software下
tar -zxvf? openssl-0.9.8i.tar.gz
cd openssl-0.9.8i
./config shared zlib? --prefix=/usr/local/openssl
make
?
make install
which openssl会发现openssl在/usr/bin目录下
mv /usr/bin/openssl /usr/bin/openssl.bak
mv /usr/include/openssl /usr/include/openssl.bak
cd /usr/bin
ln -s /usr/local/openssl/bin/openssl???????? openssl
cd? /usr/include
ln -s /usr/local/openssl/include/openssl???? openssl
然后openssl version -a输出如下:
OpenSSL 0.9.8i 15 Sep 2008
built on: Mon Dec 1 15:35:49 CST 2008
platform: linux-elf
options: bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) idea(int) blowfish(idx)
compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM
OPENSSLDIR: "/usr/local/openssl/ssl"
openssh-5.1p1.tar.gz ,放到/home/software目录下
tar -zxvf openssh-5.1pl.tar.gz
cd openssh-5.1pl
./configure --prefix=/usr/local/openssh --sysconfdir=/usr/local/openssh/etc/ssh --with-pam --with-zlib=/us?? r/local/zlib --with-ssl-dir=/usr/local/openssl --with-md5-passwords --mandir=/usr/share/man
make
make install
即可成功将openssh成功安装。
export PATH=/usr/local/openssh/bin:$JAVA_HOME/bin:$PATH??? ,注意必须把$PATH放在后半部分
然后 source? /etc/profile使之立刻生效
/etc/rc.d/rc5.d
ln -s /usr/local/openssh/sbin/sshd? S99sshd
[root@qingheliu bin]# netstat -antl | grep 22
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
[root@qingheliu bin]#
[root@qingheliu bin]# ssh -v
OpenSSH_5.1p1, OpenSSL 0.9.8i 15 Sep 2008
usage: ssh [-1246AaCfgKkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]
???????????[-D [bind_address:]port] [-e escape_char] [-F configfile]
???????????[-i identity_file] [-L [bind_address:]port:host:hostport]
???????????[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
???????????[-R [bind_address:]port:host:hostport] [-S ctl_path]
???????????[-w local_tun[:remote_tun]] [user@]hostname [command
?
?