Skip to content

Instantly share code, notes, and snippets.

@musaid
Created February 24, 2014 10:46
Show Gist options
  • Save musaid/9185461 to your computer and use it in GitHub Desktop.
Save musaid/9185461 to your computer and use it in GitHub Desktop.
Commands to bypass PEM usage in newly created AWS EC2 instances.
# Turn on password authentication
sudo sed -i ‘s/^PasswordAuthentication.*/PasswordAuthentication yes/’ /etc/ssh/sshd_config
# Reload SSH/SSHd configuration
sudo service ssh reload
# Set a password for the ubuntu (for ubuntu instances, otherwise use the default username for that instance type)
sudo passwd ubuntu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment