-1

Please help. Everything was working fine. How can I connect to the command line now?

Configuration
Amazon EC2 server
Ubuntu & Apache2
Only one user (root - not real name) has SSH access, publickey only
All other users allowed SFTP access, chrooted to home directory

What Happened
I connected to the server via SSH.
In a user's home directory, I edited a php file and moved a directory.
I logged out.

Now I can't access the server via SSH. When I try to connect via SSH, my public key is tried but does not allow access. Once the public key fails, it checks other public keys on my machine and then gives Too many authentication failures for.... The public key file has not been modified in months.

Can still connect via SFTP but I am chrooted to the user's home directory.

How can I access my command line prompt? What should I do?

2 Answers 2

3

Contact Amazon Tech support. "Too Many Authentication Failures" tells me either you have the wrong key setting in your client and you have tried too many times with the wrong credentials, someone is trying to hack your account, or someone in your organization is trying to login with a password and failing numerous times.

2
  • Added clarity to the question regarding the error message. Key never changed. Credentials are the same. Hacking is a possibility but doubtful.
    – csi
    Apr 26, 2013 at 22:19
  • 2
    My point is that if you are getting that error message, you'll need to talk to them to gain access back. It is a server side problem which could have been caused by someone trying to brute force your root password, etc. It will most likely remain unknown until you can get them to restore your access.
    – T. B.
    Apr 27, 2013 at 2:15
0

How can I access my command line prompt?

Create a copy of the Volume.
From the copied Volume, attach it as a secondary volume to a different instance.
SSH into that instance and mount the new volume.
Use the command line tools to diagnose, edit and copy as needed.
Once fixed, replace the old volume on the corrupt server with the fixed volume.

Hope this answer helps someone else who may be struggling with the same issue.

2
  • Not to be a shill but I detailed all of the steps above in a blog post. christopherickes.com/web-app-development/…
    – csi
    May 1, 2013 at 13:08
  • This is totally valid, but doesn't actually answer the question... which was "how do I login to my server?". This answer just copies the volume and attaches it to a "diagnostic" server. There are forensics you won't have access to, and you may never find out why you lost access to your original server. All well and good, and is how I handle some of these sorts of emergencies sometimes, but it isn't a silver bullet.
    – T. B.
    Jan 3, 2017 at 20:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .