[root@ip-172-31-29-44 ~]# passwd ec2-user
Changing password for user ec2-user.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@ip-172-31-29-44 ~]# vi /etc/ssh/sshd_config
PasswordAuthentication yes
[root@ip-172-31-29-44 ~]# systemctl restart sshd
% sftp ec2-user@ec2-**-***-***-**.ap-northeast-1.compute.amazonaws.com
ec2-user@ec2-**-***-***-**.ap-northeast-1.compute.amazonaws.com's password:
Connected to ec2-**-***-***-**.ap-northeast-1.compute.amazonaws.com.
sftp> ls
test.txt
sftp>