资源链接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登陆