zoukankan      html  css  js  c++  java
  • SSH升级到7.7

    #!/bin/bash
    #删除旧版ssh包 危险操作,不删除也可以安装,建议跳过此操作。
    #rpm -e `rpm -qa | grep openssh`

    #安装zlib依赖包
    wget -c http://zlib.net/zlib-1.2.11.tar.gz

    tar zxvf zlib-1.2.11.tar.gz

    cd zlib-1.2.11

    ./configure --prefix=/usr/local/zlib && make && make install

    #安装pam-devel依赖包

    yum -y install pam-devel

    #安装ssl依赖包

    wget -c https://www.openssl.org/source/openssl-1.1.1a.tar.gz

    tar zxvf openssl-1.1.1a.tar.gz


    cd openssl-1.1.1a

    ./config --prefix=/usr/local/openssl && make && make install


    #安装ssh包

    wget -c http://mirror.internode.on.net/pub/OpenBSD/OpenSSH/portable/openssh-7.7p1.tar.gz

    tar zxvf openssh-7.7p1.tar.gz

    cd openssh-7.7p1

    ./configure --prefix=/usr/local/openssh --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/usr/local/openssh/etc --with-ssl-dir=/usr/local/openssl/bin --with-zlib=/usr/local/zlib --with-md5-passwords  && make && make install

    error: *** zlib.h missing - please install first or check config.log ***
    "这是由于缺少zlib-devel所致,只需安装zlib-devel即可,执行命令:yum install zlib-devel
    OpenSSL headers missing - please install first or check config.log ***"的错误,
    这是缺少openssl-devel所致,只需安装openssl-devel即可,执行命令:yum install openssl-devel

    作者:songzhusheren 来源:CSDN 原文:https://blog.csdn.net/songzhusheren/article/details/53167008 版权声明:本文为博主原创文章,转载请附上博文链接!



    cp -p /etc/init.d/sshd /etc/init.d/sshd.lod_$(date +%Y-%m-%d_%H-%M)

    cp -p contrib/redhat/sshd.init /etc/init.d/sshd

    chmod u+x /etc/init.d/sshd

    #新安装的ssh的配置目录在/usr/local/openssh/etc 下,这款一定注意
    /usr/sbin/sshd -t -f /usr/local/openssh/etc/sshd_config  #测试配置文件有效性


    #添加开机启动项
    chkconfig --add sshd

    chkconfig sshd on

    /etc/init.d/sshd restart


    #错误处理:当报出 openssl 错误是需要 yum -y install openssl-devel

    SSH升级后,root用户无法登陆的问题:

    修改配置文件/etc/ssh/sshd_config,添加下面的设置

    PermitRootLogin yes

  • 相关阅读:
    homework2
    一件关于Bug的小事
    软件测试作业三:有关控制流图、覆盖内容
    用CSS改变select框的样式
    lab1--ideal + junit
    软件测试作业二
    记一次曾经项目中遇到的错误
    02组_现代软件工程_第04次作业——利用4象限原理分析自身CanTool项目的构成
    02组_现代软件工程_第03次作业——对于自身评价(原有水平以及长远目标分析总结)
    02组_现代软件工程_第02次作业——初谈GitHub使用详解以及设计
  • 原文地址:https://www.cnblogs.com/GNblog/p/7126966.html
Copyright © 2011-2022 走看看