Created
August 14, 2017 08:03
-
-
Save nitanka/7e07e7c7c1fc70a36438a5d491fd7ca9 to your computer and use it in GitHub Desktop.
Ansible: Changing the default ssh port
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Changing ssh default port | |
lineinfile: | |
dest: /etc/ssh/sshd_config | |
regexp: '^Port\s' | |
state: present | |
line: 'Port {{ubuntu_ssh_port}}' #give the port number you want to use | |
#note we need to restart the ssh service | |
#existing ssh connection will get disconnected | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment