3

Can't ssh to aws ec2 instance , nor public ip(from my pc) , nor private ip (from another ec2 instance)

but previously i was 100% able.

Inbound rules for public and private ip port 22 is enabled.

QUESTIONS:

  • can it be caused that free disc space left there 0mb and that is why i cannot connect ? if so then it is unclear for me why i cannot telnet \*.\*.\*.\* 22 to server port 22 or it also can be cause of disc space ?
  • can it be related to some aws side issue, because it started unexpectedly and i have to write to their support ?
Armen
  • 133
  • 5
  • It's not an AWS issue, it's an issue with how you configured your instance or how you're trying to access your instance. Exactly what is wrong is impossible to say with the information you've provided. Try looking at logs, try logging in using session manager, check your security groups and NACLs. – Tim Aug 20 '20 at 08:45

1 Answers1

1
  1. Check out if there's anything interesting in the system log and on the screen:

    enter image description here

  2. Try to reboot the instance and see if it helps.

  3. If nothing helps try to use the Systems Manager to get access as described in Recover lost access to your EC2 instance

Hope that helps :)

MLu
  • 24,849
  • 5
  • 59
  • 86
  • 1
    Thank you for responce, actually by visiting "Get System log" i found msg **No space left on device** in /dev/xvdf disc. Also i was trying to connect through session manager but seems that isntace is old and we done have system manager installed ... is it possible to install it now in this situation ? or what can be the solution ? – Armen Aug 20 '20 at 10:00
  • 1
    Nope, you can’t install anything now because you can’t login. Follow the other approach in the article - detach the root volume, attach it elsewhere, clean up to make space, re-attach to the original instance and off you go. Hope that helps :) – MLu Aug 20 '20 at 10:07
  • One more question if i can: When i created tmp instance and reattached it to another machine i cannot mount it, cause i get **wrong fs type, bad option, bad superblock on /dev/xvdf** if i run **file -sL /dev/xvdf** i get **/dev/xvda: DOS/MBR boot sector** so basically it says it is boot root disc and i'm afraid to run over it suggested in web **fsck /dev/xvdf** cmd to remove that superblock couse later it may i want be able to attache it back to main instance or ? – Armen Aug 20 '20 at 14:18
  • @Armen make sure your temp instance is the same (ideally) or similar Linux version as the broken one. If they are different it may be that there is no driver for the filesystem (e.g. XFS). – MLu Aug 20 '20 at 21:40
  • FYI i fixed issue - it was related that i was trying to mount **/dev/xvda** but it has partition **/dev/xvda1** so **mount /dev/xvda1** worked properly ! and it disc file system type was normaly ext – Armen Aug 21 '20 at 10:35