因为我想从不同的主机访问我自己的EC2。 在每个主机上键入pem文件是很困难的。
假设SSH访问:
# Turn on password authentication sudo sed -i 's/^PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config # Reload SSHd configuration sudo service sshd reload # Set a password for the ec2-user sudo passwd ec2-user