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

  • 相关阅读:
    Android Gallery和ImageSwitcher同步自动(滚动)播放图片库
    Android PullToRefreshListView和ViewPager的结合使用
    AndroidTagView云标签
    Android 两步搞定Fragment的返回键
    Android Fragment数据传递与数据回显
    Glide加载圆形图片第一次只显示默认图片
    Android 自定义EditText实现类iOS风格搜索框
    TabLayout中Indicator的样式修改
    Kali linux2.0里Metasploit的服务类型探测
    Kali linux 2016.2(Rolling)中的Nmap的端口扫描功能
  • 原文地址:https://www.cnblogs.com/GNblog/p/7126966.html
Copyright © 2011-2022 走看看