• 升级openssh


    注:升级ssh存在一定的危险性,一旦不成功可能无法通过远程连接到系统,因此在升级之前务必安装vnc或者telnet等远程服务,升级后再关闭

    ssh -V #查看当前SSH版本
    cp -r /etc/ssh/ /root/ssh_bak #备份ssh配置

    1.下载openssh

    curl -O https://openbsd.hk/pub/OpenBSD/OpenSSH/portable/openssh-8.2p1.tar.gz

    2.安装依赖包

    yum install gcc openssl-devel zlib-devel pam-devel -y

    3.解压安装包

    tar -zxvf openssh-8.2p1.tar.gz

    4.编译

    cd openssh-8.2p1
    ./configure --prefix=/usr --sysconfdir=/etc/ssh/ --with-pam --with-zlib

    5.安装

    make && make install

    6.拷贝ssh服务文件

    cp ./contrib/redhat/sshd.init /etc/init.d/sshd
    chmod +x /etc/init.d/sshd
    如果是CentOS 6.*的系统操作如下
    sed -i '/GSSAPIAuthentication /s/.*/# GSSAPIAuthentication no/' /etc/ssh/sshd_config
    sed -i '/GSSAPICleanupCredentials /s/.*/# GSSAPICleanupCredentials no/' /etc/ssh/sshd_config
    如果是CentOS 7.*的系统操作如下
    chmod 600 /etc/ssh/ssh_host*
    systemctl disable sshd
    mv /usr/lib/systemd/system/sshd.service ~

    7.重启ssh服务

    service sshd restart

    8.加入开机自启动

    chkconfig --add sshd

    9.查看下安装结果

    ssh -V
  • 相关阅读:
    poco之查看布局树
    airtest连接真机
    airtest之ADB调用
    airtest连接无线连接设备
    airtest之模拟器连接
    airtest之api、图片处理
    airtest介绍
    fidder保存请求和保存响应结果
    7 js之 条件语句
    IE6/IE7之浮动元素最后一个字母重复Bug
  • 原文地址:https://www.cnblogs.com/52py/p/13064369.html
Copyright © 2020-2023  润新知