• 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

  • 相关阅读:
    BISDN上收集到的SAP BI的极好文章的链接
    如何设置'REUSE_ALV_GRID_DISPLAY'的单个单元格的颜色
    如何设置REUSE_ALV_GRID_DISPLAY'的单个单元格的是否可以输入
    BWABAP to copy aggregates from one cube to another
    SDva01的屏幕增强
    js鼠标悬停效果
    MySQL更新UPDATA的使用
    使用mysql C语言API编写程序—MYSQL数据库查询操作
    MySQL的部分基础语句
    MySQLdelete某个元组||、&&操作
  • 原文地址:https://www.cnblogs.com/GNblog/p/7126966.html
Copyright © 2020-2023  润新知