OpenSSH升级安装步骤(redhat)
查询是否安装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
转载于:https://blog.51cto.com/whbill/665202
OpenSSH升级安装步骤(redhat)相关推荐
- linux版车机安装步骤,RedHat Linux 9.0的安装(详细图解安装过程)
RedHat Linux版本:" b, t) b) b# }, t# z- f C& S$ x0 }) GRedHat Linux是目前世界上使用最多的Linux操作系统.因为它具备 ...
- 机械师 f117 f1k 内存条 升级 安装步骤 增加内存与硬盘图文步骤
机械师F117怎么升级内存硬盘?机械师F117笔记本增加内存..._脚本之家 机械师F117升级内存硬盘准备操作: 十字螺丝到一把(拆机要用到) 笔记本DDR4内存一条,型号最还为是三星8GB DDR ...
- Linux下python升级安装步骤
安装www.cnblogs.com/lanxuezaipiao/archive/2012/10/21/2732864.html 配置环境变量 eclipse 安装PyDev 两种方式 自动方式 www ...
- ubuntu下openssh升级
一.ubuntu下openssh升级 安装依赖 sudo apt update 更新库 sudo apt install zlib1g libpam0g-dev libssl-dev 二.升级ssl, ...
- Redhat 6 OpenSSH 升级步骤
Redhat 6 OpenSSH 升级步骤 1.准备工作 1.1.下载相关软件包 OpenSSH需要依赖ZLIB和OpenSSL,因此需要从官网下载三者的源码包.需要注意的是:OpenSSH最新版7. ...
- 记openssh升级,telnet安装(环境CentOS 7.9。 晗旧版本的不同补充)
目录 一.前提工作 1. 先查看系统版本: 2. 准备相关安装包(rpm包)部分rpm包列表: 二.安装telnet(CentOS Linux release 7.9.2009环境) 1. 检查xin ...
- OpenSSH升级8.5版本rpm包制作过程及安装。OpenSSH 命令注入漏洞
OpenSSH升级8.5版本 3月3日OpenSSH官方发布最新版OpenSSH8.5,此次更新修复了之前版本存在的注入漏洞.用源码编译的方式比较慢 而且需要相关的依赖特别的多,而且公司一般都是内网环 ...
- RedHat Enterprise AS4安装步骤
//因RDMS使用新版本CentOS6.2 有问题 , 没办法只有装低版本操作系统 ! 概述 Redhat公司的Enterprise Linux AS系列 (以下简称AS系列),其中Fedora Co ...
- python3.7.2安装步骤-python安装升级详细步骤 Python2 升级 Python3
多数情况下,系统自动的Python版本是2.x, 或者yum直接安装的也是2.x ,但是,现在多数情况下建议使用3.x ,那么如何升级呢? ,下面老徐详细讲解升级步骤; 首先下载源tar包 可利用li ...
最新文章
- 考考你:输入数字,判定空格和回车
- 串口接收数据与分析处理
- 机器学习中的数学:一份新鲜出炉的热门草稿
- nagios部署安装中篇
- 在联盛德W600 SDK上添加C文件并实现GCC编译
- 中国大学MOOC 计算机组成原理第5章 测试(下)
- WebApiClient与Asp.net core DI的结合
- MySQL 获取系统时间/系统日期/日期时间的函数
- 视频工作者应该知道的几个网站
- python - 机器学习lightgbm相关实践
- 老李分享云计算基本概念 2
- ios上java代码实现_IOS学习之路五(代码实现UITableView)
- jmeter 安装与配置
- 元旦快乐代码html,好看的元旦节祝福留言代码:元旦快乐,踩个顶个走人
- Transaction
- 苹果手机如何快速的直接从相册里面的图片提取文字?
- 高数_第6章无穷级数__绝对收敛_条件收敛
- U盘安装ubuntu20.04并优化
- Numpy学习1:dtype、ndim、astype和shape
- 模电学习笔记(上交郑老师)25.深度负反馈放大电路分析
热门文章
- 语言在msin函数验证_R语言时间序列分析(七):模型准确度估计
- 智能车竞赛技术报告 | 节能信标组 - 洛阳理工学院 - Since 2021
- 安卓市场官方版_尖端实用的安卓手机APP推荐 是你们想要的!
- css实现提示信息,单纯使用CSS实现动态提示信息
- linux mysql授权外部访问权限,Linux中安装Mysql授权远程访问
- msbuild 语法_用于删除文件的MSBuild Task语法
- 本弗莱数据可视化的生产流程图_力控锂离子电池车间数据采集系统
- oracle上浮下浮分析函数_Oracle SQL高级编程——分析函数(窗口函数)全面讲解...
- python概念股_python 股票 监控,安防监控概念股,新的安防监控概念股有哪些?
- shell 脚本 进行sqlite3初始化