- 浏览: 24321 次
- 性别:
- 来自: 上海
最新评论
查询是否安装telnet
# rpm -qa | grep telnet
telnet-server-0.17-31.EL4.5
telnet-0.17-31.EL4.5
打开telnet服务
修改设置文件/etc/xinetd.d/telnet中disable字段改为no。
启动服务#ntsysv或#service xinetd restart。
创建登陆用户
因为不能直接root telnet登陆,所以创建一个登陆用户.安转完成后可以把该用户删除
useradd opensshinstall
(删除用户及/home/sshinstall目录 userdel -r sshinstall 删除这个用户的组groupdel sshinstall)
安装源文件在/usr/local/src目录下
zlib和openssl安装在/usr/local目录下
安装zlib-1.2.5
#tar -zxvf zlib-1.2.5.tar.gz
#cd zlib-1.2.5
#./configure --prefix=/usr/local/zlib-1.2.5 -share
#make
#make test
#make install
cp libz.a /usr/local/zlib-1.2.5/lib
cp libz.so.1.2.5 /usr/local/zlib-1.2.5/lib
cd /usr/local/zlib-1.2.5/lib; chmod u=rw,go=r libz.a
cp zlib.3 /usr/local/zlib-1.2.5/share/man/man3
chmod 644 /usr/local/zlib-1.2.5/share/man/man3/zlib.3
cp zlib.pc /usr/local/zlib-1.2.5/lib/pkgconfig
chmod 644 /usr/local/zlib-1.2.5/lib/pkgconfig/zlib.pc
cp zlib.h zconf.h /usr/local/zlib-1.2.5/include
chmod 644 /usr/local/zlib-1.2.5/include/zlib.h /usr/local/zlib-1.2.5/include/zconf.h
#vi /etc/ld.so.conf 配置库文件搜索路径
include ld.so.conf.d/*.conf
##add 2010.7.7
/usr/local/zlib-1.2.5/lib
##add end
#ldconfig -v 刷新缓存文件/etc/ld.so.cache
#ln -s /usr/local/zlib-1.2.5 /usr/local/zlib
安装openssl
#cd /usr/local/src
#tar zxvf openssl-1.0.0a.tar.gz
#cd openssl-1.0.0a
#./config shared zlib-dynamic --prefix=/usr/local/openssl-1.0.0a --with-zlib-lib=/usr/local/zlib-1.2.5/lib --with-zlib-include=/usr/local/zlib-1.2.5/include
#make
#make test (这一步是进行 SSL 加密协议的完整测试,如果出现错误就要一定先找出原因,否则一味继续可能导致 SSH 不能使用!)
#make install
#vi /etc/ld.so.conf 配置库文件搜索路径
############################################
## add below line to ld.so.conf
/usr/local/openssl-1.0.0a/lib 64位OS 没有生成lib目录,是lib64目录
############################################
#ldconfig -v 刷新缓存文件/etc/ld.so.cache
#ln -s /usr/local/openssl-1.0.0a /usr/local/openssl
vi /etc/profile
###########################################
(add to end of the file)
PATH=/usr/local/openssl/bin:$PATH
export PATH
###########################################
退出,再登录,查看openssl的版本号,以验正是否安装正确
#openssl version -a
OpenSSL 1.0.0a 1 Jun 2010
built on: Wed Jul 7 17:08:07 CST 2010
platform. linux-x86_64
options: bn(64,64) rc4(1x,char) des(idx,cisc,16,int) idea(int) blowfish(idx)
compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DWHIRLPOOL_ASM
OPENSSLDIR: "/usr/local/openssl-1.0.0a/ssl"
停止并卸载Openssh
1.停止OpenSSH服务
#service sshd stop
2. 查询并卸载openssh
# rpm -qa | grep openssh
openssh-3.9p1-8.RHEL4.24
openssh-askpass-3.9p1-8.RHEL4.24
openssh-clients-3.9p1-8.RHEL4.24
openssh-server-3.9p1-8.RHEL4.24
openssh-askpass-gnome-3.9p1-8.RHEL4.24
#rpm -e openssh-3.9p1-8.RHEL4.24 --nodeps
#rpm -e openssh-clients-3.9p1-8.RHEL4.24 --nodeps
警告/etc/ssh/ssh_config 已存为 /etc/ssh/ssh_config.rpmsave
#rpm -e openssh-askpass-3.9p1-8.RHEL4.24
#rpm -e openssh-server-3.9p1-8.RHEL4.24 --nodeps
#rpm -e openssh-askpass-gnome-3.9p1-8.RHEL4.24
cd /usr/local/src
tar zxvf openssh-5.5p1.tar.gz
cd openssh-5.5p1
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-ssl-dir=/usr/local/openssl-1.0.0a --with-md5-passwords --mandir=/usr/share/man --with-zlib=/usr/local/zlib-1.2.5
#make
#make install
#
将sshd加入启动服务:
进入ssh安装解压目录
#cp ./contrib/redhat/sshd.init /etc/init.d/sshd
#chmod +x /etc/init.d/sshd
#chkconfig --add sshd
最后,启动 SSH 服务使修改生效:
# service sshd start
重启后确认一下当前的 OpenSSH 和 OpenSSL 是否正确:
# ssh -v
如果看到了新的版本号就没问题啦!
关闭telnet服务
修改设置文件/etc/xinetd.d/telnet中disable字段改为yes。
启动服务#ntsysv或#service xinetd restart。
注意问题
1.在安装openssh, ./configure 时,报下面错误:
configure: error: PAM headers not found
运行# rpm -qa | grep pam
pam_smb-1.1.7-5
pam_ccreds-1-3
pam_passwdqc-0.7.5-2
pam-0.77-66.17
pam_krb5-2.1.8-1
spamassassin-3.0.6-1.el4
发现有 pam-0.77-66.17,从网上找到 pam-devel-0.77-66.17.i386.rpm,
运行rpm -ivh pam-devel-0.77-66.17.i386.rpm后,./configure正常
版本号0.77-66.17必须一样。
2.在安装openssh时,configure报错:
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-zlib --with-ssl-dir=/usr/include/openssl --with-md5-passwords --mandir=/usr/share/man
.....
configure: error: *** zlib too old - check config.log ***
Your reported zlib version has known security problems. It's possible your
vendor has fixed these problems without changing the version number. If you
are sure this is the case, you can disable the check by running
"./configure --without-zlib-version-check".
If you are in doubt, upgrade zlib to version 1.2.3 or greater.
See http://www.gzip.org/zlib/ for details.
因此需要升级zlib.
3.如果操作系统是64位的,openssl-1.0.0a只生成了lib64,没有生成lib目录。openssh configure时,还是连接的老版本的openssl,郁闷。
4. ./configure显示信息:
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-ssl-dir=/usr/local/openssl-1.0.0a --with-md5-passwords --mandir=/usr/share/man --with-zlib=/usr/local/zlib-1.2.5
显示信息:
OpenSSH has been configured with the following options:
User binaries: /usr/bin
System binaries: /usr/sbin
Configuration files: /etc/ssh
Askpass program: /usr/libexec/ssh-askpass
Manual pages: /usr/share/man/manX
PID file: /var/run
Privilege separation chroot path: /var/empty
sshd default user PATH: /usr/bin:/bin:/usr/sbin:/sbin
Manpage format: doc
PAM support: yes
OSF SIA support: no
KerberosV support: no
SELinux support: no
Smartcard support:
S/KEY support: no
TCP Wrappers support: no
MD5 password support: yes
libedit support: no
Solaris process contract support: no
IP address in $DISPLAY hack: no
Translate v4 in v6 hack: yes
BSD Auth support: no
Random number source: OpenSSL internal ONLY
Host: i686-pc-linux-gnu
Compiler: gcc
Compiler flags: -g -O2 -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -fno-builtin-memset -std=gnu99
Preprocessor flags: -I/usr/local/openssl-1.0.0a/include -I/usr/local/zlib-1.2.5/include
Linker flags: -L/usr/local/openssl-1.0.0a/lib -L/usr/local/zlib-1.2.5/lib
Libraries: -lresolv -lcrypto -ldl -lutil -lz -lnsl -lcrypt
+for sshd: -lpam
PAM is enabled. You may need to install a PAM control file
for sshd, otherwise password authentication may fail.
Example PAM control files can be found in the contrib/
subdirectory
# rpm -qa | grep telnet
telnet-server-0.17-31.EL4.5
telnet-0.17-31.EL4.5
打开telnet服务
修改设置文件/etc/xinetd.d/telnet中disable字段改为no。
启动服务#ntsysv或#service xinetd restart。
创建登陆用户
因为不能直接root telnet登陆,所以创建一个登陆用户.安转完成后可以把该用户删除
useradd opensshinstall
(删除用户及/home/sshinstall目录 userdel -r sshinstall 删除这个用户的组groupdel sshinstall)
安装源文件在/usr/local/src目录下
zlib和openssl安装在/usr/local目录下
安装zlib-1.2.5
#tar -zxvf zlib-1.2.5.tar.gz
#cd zlib-1.2.5
#./configure --prefix=/usr/local/zlib-1.2.5 -share
#make
#make test
#make install
cp libz.a /usr/local/zlib-1.2.5/lib
cp libz.so.1.2.5 /usr/local/zlib-1.2.5/lib
cd /usr/local/zlib-1.2.5/lib; chmod u=rw,go=r libz.a
cp zlib.3 /usr/local/zlib-1.2.5/share/man/man3
chmod 644 /usr/local/zlib-1.2.5/share/man/man3/zlib.3
cp zlib.pc /usr/local/zlib-1.2.5/lib/pkgconfig
chmod 644 /usr/local/zlib-1.2.5/lib/pkgconfig/zlib.pc
cp zlib.h zconf.h /usr/local/zlib-1.2.5/include
chmod 644 /usr/local/zlib-1.2.5/include/zlib.h /usr/local/zlib-1.2.5/include/zconf.h
#vi /etc/ld.so.conf 配置库文件搜索路径
include ld.so.conf.d/*.conf
##add 2010.7.7
/usr/local/zlib-1.2.5/lib
##add end
#ldconfig -v 刷新缓存文件/etc/ld.so.cache
#ln -s /usr/local/zlib-1.2.5 /usr/local/zlib
安装openssl
#cd /usr/local/src
#tar zxvf openssl-1.0.0a.tar.gz
#cd openssl-1.0.0a
#./config shared zlib-dynamic --prefix=/usr/local/openssl-1.0.0a --with-zlib-lib=/usr/local/zlib-1.2.5/lib --with-zlib-include=/usr/local/zlib-1.2.5/include
#make
#make test (这一步是进行 SSL 加密协议的完整测试,如果出现错误就要一定先找出原因,否则一味继续可能导致 SSH 不能使用!)
#make install
#vi /etc/ld.so.conf 配置库文件搜索路径
############################################
## add below line to ld.so.conf
/usr/local/openssl-1.0.0a/lib 64位OS 没有生成lib目录,是lib64目录
############################################
#ldconfig -v 刷新缓存文件/etc/ld.so.cache
#ln -s /usr/local/openssl-1.0.0a /usr/local/openssl
vi /etc/profile
###########################################
(add to end of the file)
PATH=/usr/local/openssl/bin:$PATH
export PATH
###########################################
退出,再登录,查看openssl的版本号,以验正是否安装正确
#openssl version -a
OpenSSL 1.0.0a 1 Jun 2010
built on: Wed Jul 7 17:08:07 CST 2010
platform. linux-x86_64
options: bn(64,64) rc4(1x,char) des(idx,cisc,16,int) idea(int) blowfish(idx)
compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DWHIRLPOOL_ASM
OPENSSLDIR: "/usr/local/openssl-1.0.0a/ssl"
停止并卸载Openssh
1.停止OpenSSH服务
#service sshd stop
2. 查询并卸载openssh
# rpm -qa | grep openssh
openssh-3.9p1-8.RHEL4.24
openssh-askpass-3.9p1-8.RHEL4.24
openssh-clients-3.9p1-8.RHEL4.24
openssh-server-3.9p1-8.RHEL4.24
openssh-askpass-gnome-3.9p1-8.RHEL4.24
#rpm -e openssh-3.9p1-8.RHEL4.24 --nodeps
#rpm -e openssh-clients-3.9p1-8.RHEL4.24 --nodeps
警告/etc/ssh/ssh_config 已存为 /etc/ssh/ssh_config.rpmsave
#rpm -e openssh-askpass-3.9p1-8.RHEL4.24
#rpm -e openssh-server-3.9p1-8.RHEL4.24 --nodeps
#rpm -e openssh-askpass-gnome-3.9p1-8.RHEL4.24
cd /usr/local/src
tar zxvf openssh-5.5p1.tar.gz
cd openssh-5.5p1
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-ssl-dir=/usr/local/openssl-1.0.0a --with-md5-passwords --mandir=/usr/share/man --with-zlib=/usr/local/zlib-1.2.5
#make
#make install
#
将sshd加入启动服务:
进入ssh安装解压目录
#cp ./contrib/redhat/sshd.init /etc/init.d/sshd
#chmod +x /etc/init.d/sshd
#chkconfig --add sshd
最后,启动 SSH 服务使修改生效:
# service sshd start
重启后确认一下当前的 OpenSSH 和 OpenSSL 是否正确:
# ssh -v
如果看到了新的版本号就没问题啦!
关闭telnet服务
修改设置文件/etc/xinetd.d/telnet中disable字段改为yes。
启动服务#ntsysv或#service xinetd restart。
注意问题
1.在安装openssh, ./configure 时,报下面错误:
configure: error: PAM headers not found
运行# rpm -qa | grep pam
pam_smb-1.1.7-5
pam_ccreds-1-3
pam_passwdqc-0.7.5-2
pam-0.77-66.17
pam_krb5-2.1.8-1
spamassassin-3.0.6-1.el4
发现有 pam-0.77-66.17,从网上找到 pam-devel-0.77-66.17.i386.rpm,
运行rpm -ivh pam-devel-0.77-66.17.i386.rpm后,./configure正常
版本号0.77-66.17必须一样。
2.在安装openssh时,configure报错:
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-zlib --with-ssl-dir=/usr/include/openssl --with-md5-passwords --mandir=/usr/share/man
.....
configure: error: *** zlib too old - check config.log ***
Your reported zlib version has known security problems. It's possible your
vendor has fixed these problems without changing the version number. If you
are sure this is the case, you can disable the check by running
"./configure --without-zlib-version-check".
If you are in doubt, upgrade zlib to version 1.2.3 or greater.
See http://www.gzip.org/zlib/ for details.
因此需要升级zlib.
3.如果操作系统是64位的,openssl-1.0.0a只生成了lib64,没有生成lib目录。openssh configure时,还是连接的老版本的openssl,郁闷。
4. ./configure显示信息:
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-ssl-dir=/usr/local/openssl-1.0.0a --with-md5-passwords --mandir=/usr/share/man --with-zlib=/usr/local/zlib-1.2.5
显示信息:
OpenSSH has been configured with the following options:
User binaries: /usr/bin
System binaries: /usr/sbin
Configuration files: /etc/ssh
Askpass program: /usr/libexec/ssh-askpass
Manual pages: /usr/share/man/manX
PID file: /var/run
Privilege separation chroot path: /var/empty
sshd default user PATH: /usr/bin:/bin:/usr/sbin:/sbin
Manpage format: doc
PAM support: yes
OSF SIA support: no
KerberosV support: no
SELinux support: no
Smartcard support:
S/KEY support: no
TCP Wrappers support: no
MD5 password support: yes
libedit support: no
Solaris process contract support: no
IP address in $DISPLAY hack: no
Translate v4 in v6 hack: yes
BSD Auth support: no
Random number source: OpenSSL internal ONLY
Host: i686-pc-linux-gnu
Compiler: gcc
Compiler flags: -g -O2 -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -fno-builtin-memset -std=gnu99
Preprocessor flags: -I/usr/local/openssl-1.0.0a/include -I/usr/local/zlib-1.2.5/include
Linker flags: -L/usr/local/openssl-1.0.0a/lib -L/usr/local/zlib-1.2.5/lib
Libraries: -lresolv -lcrypto -ldl -lutil -lz -lnsl -lcrypt
+for sshd: -lpam
PAM is enabled. You may need to install a PAM control file
for sshd, otherwise password authentication may fail.
Example PAM control files can be found in the contrib/
subdirectory
发表评论
-
monit
2015-07-19 15:51 0http://blog.csdn.net/coolboylai ... -
monit linux监控
2015-07-19 14:03 324English | VPS常用软件下载 ... -
JAVA 持久层三种查询方式
2015-01-04 09:56 400Java JPA有三种查询方式: 1)JPQL 2)Crite ... -
apache2.2设置最大连接数
2014-09-09 10:39 791Apache的最大连接数,默认为256个。 修改ap ... -
linux启动oracle
2014-06-18 12:59 371http://www.360doc.com/content/1 ... -
javascript:history.go()和History.back()的区别
2013-10-09 16:13 674javascript:history.go()和History ... -
struts2中各个jar包的作用
2013-09-13 09:19 632struts2 jar包说明 commons-logging- ... -
js操作SELECT对象
2013-09-02 16:38 633<html> <head> <t ... -
js实现javaMap对象
2013-08-22 08:38 527<script> /*js实现map功能*/ f ... -
input中的事件及方法
2013-07-18 16:50 0input text 的事件及方法 ... -
js循环删除表格
2013-06-07 10:37 693由于表格的总条数会随着表格的删除动态改变,因此不能使用传统的f ... -
web.xm文件的作用
2013-03-18 12:11 779web工程中的web.xml文件有 ... -
myeclipse修改cvs链接地址
2013-02-18 10:23 2239由于服务器IP的地址的变更,在eclipse中要进行更改仓库的 ... -
模态窗口使用介绍
2013-01-06 15:46 574打开模态窗口 window.showModalDialog(u ... -
js操作表格的方法介绍
2012-12-07 13:44 947在web开发中使用js动态生成表格的情况非常普遍,现对常用的方 ... -
js设置DIV属性
2012-12-05 08:42 665//控制内容 function settex ... -
document.getElementsByTagName()方法摘要
2012-09-07 18:01 637document.getElementsByTagName() ... -
设计select语句时影响效率查询的15个情况
2012-08-27 16:20 821没有创建索引,或者没有正确使用索引; 存在死锁的情况,从而导 ... -
web.xml配置文件详解
2011-12-26 11:15 5831 定义头和根元素 ... -
struts2文件上传最大值配置
2011-12-02 16:58 631使用Struts2的文件上传控 ...
相关推荐
对服务器进行安全加固时会遇到升级openssh的情况。“RedHat Linux主机升级openssh步骤”本人亲自收集整理,有效可行。
运行脚本就可以升级openssh至9.7 如果报错,先对脚本进行转码:dos2unix openssh/update_ssh.sh 在运行脚本 操作系统: Operating System:Kylin Linux Advanced Server V10 Kernel: Linux 4.19.90-52.22.v2207.ky10...
openssh_download="https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/$openssh_version.tar.gz" # Function :openssh-9.0p1 update # # Platform :Centos7.X # # Version :2.0 # # Date :2022-05-01 #
linux red hat 升级openssh7.8p所需的依赖包以及主包,需要的可以下载。
linux7升级到 openssl3.0.2 openssh8.9.p1 linux7升级到 openssl3.0.2 openssh8.9.p1 linux7升级到 openssl3.0.2 openssh8.9.p1 linux7升级到 openssl3.0.2 openssh8.9.p1 linux7升级到 openssl3.0.2 openssh8.9...
llinux离线升级OpenSSH时,所依赖的安装包,亲测可以升级成功。 具体的升级方法可以参考如下: Linux环境 OpenSSH升级8.4&Telnet安装&8.6:https://blog.csdn.net/qq_35911309/article/details/109243172 OpenSSH...
CentOS7升级OPENSSH至8.9P1,无需编译,内含rpm包、一键安装脚本
本文档包含升级OpenSSH和NTP服务的升级包和升级步骤 操作系统版本:Ubuntu 14 Server 64bit 升级到的版本:OpenSSH 7.5p1,NTP 4.2.8p10
centos7下升级openssh到8.4脚本
centos6,centos7,oracle离线升级openssh 及 openssl修复系统漏洞。telnet+vsftp+openssh,centos的离线rpm安装包和依赖包,离线升级openssh教程 tcentos6升级openssh到7.9版本,centos7升级openssh到8版本
升级openssh到8.3
openssh离线升级8.8
linux下升级OpenSSH、OpenSSL OpenSSH漏洞扫描及修复操作文档 里面包含了一些升级所需的以来工具包 亲试后,整理所得该文档,可用哦
离线升级openssh所需的rpm包
该安装软件包是基于centos6.6,openssh8.1编译的,其他linux版本不保证好用,请慎重下载
openssh升级相关软件安装包以及升级步骤txt,前言:linux openssh漏洞,为修复此漏洞,一般是升级是将openssh升级版本,此步骤为将openssh5.3升级到6.7 (下载地址:...
linux下ubuntu的openssh升级的流程,以及openssl的升级
CentOS7离线升级openssh-9.7p1 将openssh-9.7p1的rpm包上传到本地服务器 进入openssh9.7p1文件夹,里面包含openssh-9.7p1升级的rpm包 查看当前openssh的版本 使用yum localinstall openssh-*.rpm 进行更新 授权,...
貌似9.6P1以下版本都会受到影响,与之相关的可利用漏洞标记有:CVE-2023-48795、CVE-2023-46445、CVE-2023-46446,今天趁着周末时间更新一个针对RPM系与DEB系Linux系统源码安装OpenSSHServer 9.6P1版本的教程,...
linux升级openSSH详细步骤说明,CentOS7 openssh升级到8.8p1,修复漏洞。