TransWikia.com

Cant login to aws ec2 instance

Server Fault Asked by Akash Gajbhiye on November 20, 2021

The instance is running ubuntu 18 in my public_html folder, there is a folder called users I wanted to change all the subfolder permissions to 777 to I did the following command inside the public_html folder

find users -type d -exec chmod 777 {} ;

and now I cannot log in to the instance it says

FATAL ERROR: No supported authentication methods available (server sent: publickey)

One Answer

SSH keys need to have specific permissions otherwise they won't work. Easiest is to restore from backup, which in AWS is a snapshot.

If you don't have a backup then you can:

  1. Stop your instance
  2. Mount the volume to another instance
  3. Change the permissions back (permissionshere)
  4. Mount the volume back to an instance as the main volume.

Answered by Tim on November 20, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP