When using sshpass on Amazon Linux 2, it took some time to activate the EPEL repository, so I will explain the procedure.
sudo amazon-linux-extras install epel -y
sudo yum-config-manager --enable epel
sudo yum install -y sshpass
sshpass -p {password} ssh {user name}@{SSH destination}
--How do I enable the EPEL repository for an Amazon EC2 instance running CentOS, RHEL, or Amazon Linux? --Install sshpass
Recommended Posts