Disable password authentication for `SSH` daemon.
This commit is contained in:
parent
6bc876df6f
commit
cf28ca20b6
|
@ -31,3 +31,13 @@ remote_file '/home/kazu634/.ssh/config' do
|
|||
mode '644'
|
||||
end
|
||||
|
||||
# Disable Password authentication
|
||||
file '/etc/ssh/sshd_config.d/50-cloud-init.conf' do
|
||||
action :delete
|
||||
end
|
||||
|
||||
execute 'systemctl restart ssh.service ' do
|
||||
action :nothing
|
||||
subscribes :run, 'file[/etc/ssh/sshd_config.d/50-cloud-init.conf]'
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue