Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm relatively new to Linux, and whilst installing a number of different applications on my Ubuntu server instance, somebody helpfully suggested I use 'sudo su' to speed things up a little. All good. I then disconnected (or let my connection time-out) when attempting to connect a little later on, I get 'Server refused our key' and am unable to log-in.

I've managed to mount the volume against another instance - so can thankfully access the filesystem - and my question is this:

Is it possible for me to fix this while I've got access to the volume? If so could anyone point me in the direction of any useful info on how I might go about this?



share|improve this question

The command sudo su just switches to root. That command alone can't have any effect on you logging in. It must have been caused by another command or one of the applications you have installed.

share|improve this answer
Ah okay - so it's not due to the same environment variables problem this user is / has had? [link] (…) – Mark Kelly Aug 3 '12 at 9:12

If you haven't installed your own ssh key on the instance, you need to connect using the ssh key that Amazon installs into each instance by default (and provided to you).


ssh -i GSG_Keypair.pem ec2-user@
share|improve this answer
Sure - and that's how I've been connecting to the instance, right up to the point where it suddenly stopped letting me. Just to clarify - I'm also using the same key on another instance, and that still works fine. – Mark Kelly Aug 3 '12 at 12:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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