Skip to content

Instantly share code, notes, and snippets.

@theqwan-chengwei
Last active January 15, 2016 04:20
Show Gist options
  • Save theqwan-chengwei/18e0840fe5b6960d8828 to your computer and use it in GitHub Desktop.
Save theqwan-chengwei/18e0840fe5b6960d8828 to your computer and use it in GitHub Desktop.
透過 ansible 修復 CVE-2016-0777、CVE-2016-0778,執行的時候記得輸入自己的 host
#ansible 1.9.2
- name: fix_CVE-2016-0777_0778
hosts: "{{ myhost }}"
sudo: True
sudo_user: root
tasks:
- name: upgrade openssh
apt: name={{ item }} state=latest update_cache=yes
with_items:
- openssh-client
- openssh-server
- openssh-sftp-server
- name: UseRoaming no
lineinfile: dest=/etc/ssh/ssh_config insertafter=EOF line='UseRoaming no'
- name: Restart openssh
service: name=ssh state=restarted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment