sudo passwd rootsu rootvi /etc/ssh/sshd_config"# PasswordAuthentication yes" uncommentsbin/service ssh restart这样就不用ssh ec2-user@ecxx.xxx.xx.us-west-1.compute.amazonaws.com -i xxx.pem