1

Had an issue where an instance became unresponsive and was forced into a reboot. After the reboot I could ping the server but could not SSH into the server.

Ultimately I created a new instance and connected the volume to the new instance. However I would like to make sure when I reboot this instance I don't run into the same problem.

Looking at the console log I see:

[ 2.968537] EXT4-fs (xvda1): INFO: recovery required on readonly filesystem

[ 2.972324] EXT4-fs (xvda1): write access will be enabled during recovery

[ 3.095607] EXT4-fs (xvda1): orphan cleanup on readonly fs

[ 3.354696] EXT4-fs (xvda1): 40 orphan inodes deleted

[ 3.358010] EXT4-fs (xvda1): recovery complete

[ 3.465864] EXT4-fs (xvda1): mounted filesystem with ordered data mode. Opts: (null)

My sshd_config file has two changes from the default UsePAM was set to no and PasswordAuthentication was set to yes. I don't think that had anything to do with it.

My /etc/fstab file was set to: LABEL=cloudimg-rootfs / ext4 defaults,discard 0 0 /dev/xvdb /mnt auto defaults,nobootwait,comment=cloudconfig 0 2 /dev/xvdg /hd3 auto noatime 0 0

/dev/xvdf /hd3 auto noatime 0 0

/dev/xvdf /hd2 auto noatime 0 0 /dev/xvdh /hd4 auto noatime 0 0 /dev/xvdh /hd4 auto noatime 0 0 /dev/xvdi /vol auto noatime 0 0 /dev/xvdi /hd5 auto noatime 0 0

I checked all the obvious things like making sure I'm connecting to the right IP, etc.

Any idea on why this did not allow SSH?

  • if the filesystem was corrupted and opened in read-only mode, then it couldn't create or write to any tmp or log files when you tried to ssh. – LHWizard Apr 24 '15 at 15:09
  • Did you check your security settings on the new instance to make sure TCP/22 was allowed? – Jordan Apr 24 '15 at 15:31
1

You said:

My sshd_config file has two changes from the default UsePAM was set to no and PasswordAuthentication was set to yes. I don't think that had anything to do with it.

Actually that almost certainly is your problem. On a Linux system with PAM, attempting to login bypassing PAM is not guaranteed to work, and generally does not.

Set UsePAM yes and try again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.