前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >Redhat 6.5源码编译升级openssh到7.8版本

Redhat 6.5源码编译升级openssh到7.8版本

原创
作者头像
好派笔记
修改2021-09-14 14:52:27
修改2021-09-14 14:52:27
6840
举报
文章被收录于专栏:好派笔记好派笔记
1.检验升级OpenSSH依赖的相关组件
  1. [root@web02 /]# rpm -qa | grep gcc
  2. [root@web02 /]# rpm -qa | grep zlib-devel
  3. [root@web02 /]# rpm -qa | grep openssl-devel
  4. [root@web02 /]# rpm -qa | grep  pam-devel

# rpm -qa | grep pam-devel 如没有,直接用yum安装。

  1. [root@web02 /]# yum install gcc zlib-devel pam-devel   openssl-devel
2.源码编译安装OpenSSh的7.8版本
  1. [root@web02 /]# mv /etc/ssh/ /etc/ssh.bak  
  2. [root@web02 /]# wget https://openbsd.hk/pub/OpenBSD/OpenSSH/portable/openssh-7.8p1.tar.gz
  3. [root@web02 /]# tar -xf openssh-7.8p1.tar.gz  
  4. [root@web02 /]# cd openssh-7.8p1  
  5. [root@web02 /]# ./configure --prefix=/usr --with-zlib --sysconfdir=/etc/ssh --with-ssl-dir=/usr --with-md5-passwords --with-pam  
  6. [root@web02 /]# make  
  7. [root@web02 /]# make install  
  8. [root@web02 /]# mv /etc/ssh  /etc/ssh-7.8p1-conf  
  9. [root@web02 /]# mv /etc/ssh.bak/ /etc/ssh  
  10. [root@web02 /]# sed -i '/^#PermitRootLogin/s/#PermitRootLogin yes/PermitRootLogin yes/'/etc/ssh/sshd_config  
  11. 或手动修改PermitRootLogin no 修改为 PermitRootLogin yes 允许root远程登陆。  
  12. [root@web02 /]# sed -i '/^GSSAPIAuthentication yes/s/GSSAPIAuthentication yes/#GSSAPIAuthentication yes/'/etc/ssh/sshd_config  
  13. [root@web02 /]# sed -i '/^GSSAPICleanupCredentials yes/s/GSSAPICleanupCredentials yes/#GSSAPICleanupCredentials yes/'/etc/ssh/sshd_config  
  14. [root@web02 /]# cp /etc/ssh-7.8p1-conf/ssh_host_ecdsa_key /etc/ssh  
  15. [root@web02 /]# cp /etc/ssh-7.8p1-conf/ssh_host_ed25519_key /etc/ssh  
3.重启查看版本
  1. [root@web02 openssh-7.8p1]# service sshd restart
  2. 停止 sshd:[确定]  
  3. 正在启动 sshd:[确定]  
  4. [root@web02 openssh-7.8p1]# ssh -V
  5. OpenSSH_7.8p1, OpenSSL1.0.1e-fips 11Feb2013  
  6. [root@web02 openssh-7.8p1]#

# 升级完成。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1.检验升级OpenSSH依赖的相关组件
  • 2.源码编译安装OpenSSh的7.8版本
  • 3.重启查看版本
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档