#!/bin/bash sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config systemctl restart sshd echo 'password' | passwd --stdin ec2-user
Platform : Amazon Linux 2