openssh升级到openssh8.4

资源链接openssh8.4_x86_64.zip-Linux文档类资源-CSDN下载

资源包括

openssh-8.4p1-1.el7.x86_64.rpm

openssh-askpass-8.4p1-1.el7.x86_64.rpm

openssh-askpass-gnome-8.4p1-1.el7.x86_64.rpm

openssh-clients-8.4p1-1.el7.x86_64.rpm

openssh-debuginfo-8.4p1-1.el7.x86_64.rpm

openssh-server-8.4p1-1.el7.x86_64.rpm

repodata

ssh.repo

安装步骤

unzip openssh8.4_x86_64.zip -d /tmp/
cp /tmp/x86_64/ssh.repo /etc/yum.repos.d/ssh.repo
yum clean all
yum install -y openssh
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config
systemctl restart sshd

ansiable

- hosts: 10.2.0.173
  user: root
  gather_facts: false 

  tasks:

    # Walk through account creation, modification, and deletion
    - name: Copy soft
      copy: src=/etc/ansible/work/soft/openssh_x86_64.zip  dest=/tmp/
    - name: shell unzip
      command: unzip /tmp/openssh_x86_64.zip -d /tmp/
    - name: copy ssh repo
      command: cp /tmp/x86_64/ssh.repo /etc/yum.repos.d/
    - name: yum clean
      command: yum clean all
    - name: yum 
      command: yum -y install openssh
    - name: sshd_configg
      shell: echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
    - name: sshd_config
      shell: echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config
    - name: start sshd
      service: name=sshd state=restarted enabled=yes

注:升级后 ssh 默认不允许root登陆 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

疯飙的蜗牛

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值