diff --git a/cookbooks/kazu634/ssh.rb b/cookbooks/kazu634/ssh.rb index 5461a51..d4773c1 100644 --- a/cookbooks/kazu634/ssh.rb +++ b/cookbooks/kazu634/ssh.rb @@ -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 +