zoukankan      html  css  js  c++  java
  • centos7.2升级openssh到8.0


    参考链接:
    https://blog.csdn.net/weixin_43103905/article/details/89925717
    https://blog.csdn.net/weixin_43103905/article/details/87185884

    卸载openssh
    rpm -qa | grep openssh
    rpm -e --nodeps openssh-clients
    rpm -e --nodeps openssh
    rpm -e --nodeps openssh-server
    rpm -qa |grep openssh

    安装gcc
    yum -y install gcc gcc-c++ kernel-devel

    编译
    cd /software/openssh-8.0p1
    ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-zlib --with-md5-passwords --with-tcp-wrappers

    chmod 600 /etc/ssh/ssh_host_rsa_key
    chmod 600 /etc/ssh/ssh_host_ecdsa_key
    chmod 600 /etc/ssh/ssh_host_ed25519_key

    安装
    make && make install

    配置
    install -v -m755 contrib/ssh-copy-id /usr/bin
    install -v -m644 contrib/ssh-copy-id.1 /usr/share/man/man1
    install -v -m755 -d /usr/share/doc/openssh-8.0p1
    install -v -m755 -d /usr/share/doc/openssh-8.0p1/
    install -v -m644 INSTALL LICENCE OVERVIEW README*
    install -v -m644 INSTALL LICENCE OVERVIEW README* /usr/share/doc/openssh-8.0p1/

    修改配置文件
    vi /etc/ssh/sshd_config
    echo "X11Forwarding yes" >> /etc/ssh/sshd_config
    echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
    echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config

    开机自启动
    cp -p contrib/redhat/sshd.init /etc/init.d/sshd
    chmod +x /etc/init.d/sshd
    chkconfig --add sshd
    chkconfig sshd on
    chkconfig --list sshd
    systemctl restart sshd

    验证
    ssh -V
    netstat -ntlp

  • 相关阅读:
    UVA1599 理想路径 Ideal Path(最短路径)
    换根DP
    小w的魔术扑克(树状数组+并查集)
    NOIP 2016蚯蚓(优先队列)
    ZR 动物园
    T105017 seq(DP)
    noip2017酱油记
    noip2017酱油记前篇
    P1985 翻转棋
    luogu P2512 [HAOI2008]糖果传递
  • 原文地址:https://www.cnblogs.com/nshuai/p/11497531.html
Copyright © 2011-2022 走看看