Menu

Close
  • Home
Subscribe
Menu

Allow Root Login via Auth Key in EC2

24 May 2016 on AWS, EC2, Root Login

If you want to update your EC2 instance to enable root login via key file:
1. Login as user "EC2-User"
2. sudo su -
3. cp ~/.ssh/authorized_keys ~/.ssh/authorized_keys.bak
4. vim ~/.ssh/authorized_keys
5. remove everything before "ssh-rsa"
6. esc -> :wq
7. vim /etc/ssh/sshd_config
8. Please ensure these are enabled:
PermitRootLogin yes
# Only allow root to run commands over ssh, no shell
# PermitRootLogin forced-commands-only
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
8. esc -> :wq
9. service sshd reload
10. Profit?!

Cmd Vimes

Read more posts by this author.

Share this post

Twitter Facebook Google+

Welcome to Ghost

You're live! Nice. We've put together a little post to introduce you to the Ghost editor and get you…

Cloud Technologies © 2016
Proudly published with Ghost