Skip to content

Instantly share code, notes, and snippets.

@kevincharm
Last active March 20, 2018 16:45
Show Gist options
  • Save kevincharm/587c65a210df74b182a6 to your computer and use it in GitHub Desktop.
Save kevincharm/587c65a210df74b182a6 to your computer and use it in GitHub Desktop.
AWS CentOS 7 AMI => Setup for root login via SSH

AWS CentOS 7 AMI Setup for mplz

  1. SSH to EC2 then exec sudo visudo then add line centos ALL=(ALL) NOPASSWD:ALL
  2. exec sudo su - root
  3. exec sudo vi /etc/ssh/sshd_config then edit/uncomment line PermitRootLogin without-password
  4. exec sudo cp /home/centos/.ssh/authorized_keys /root/.ssh

Additional steps

After using mplz setup && mplz deploy, and nginx doesn't want to serve your Meteor app, it's because of SELinux blocking the reverse proxy. The fix:

  1. sudo cat /var/log/audit/audit.log | grep nginx | grep denied | audit2allow -M meteornginx
  2. semodule -i meteornginx.pp
@Shahebaaz
Copy link

Thanks Kevin!
please keep up the good work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment