[Linux] Shell Script로 Password 변경

ondacloud·2023년 3월 23일

Linux

목록 보기
2/11
post-thumbnail

CentOS

sed -i "s|PasswordAuthentication no|PasswordAuthentication yes|g" /etc/ssh/sshd_config
systemctl restart sshd
echo '<password>' | passwd --stdin ec2-user

Ubuntu

sed -i "s|PasswordAuthentication no|PasswordAuthentication yes|g" /etc/ssh/sshd_config
systemctl restart sshd
echo '<ubuntu:password>' | chpasswd
profile
Devops Engineer가 목표인 학생

0개의 댓글