I have created an instance from a shared snapshot from other aws account,following steps were done by me,
1.Share snapshot from other account.
2.copy it to my account.
3.create a volume from it volumeold ID- vol-594axxxx
4.launch a new instance ID- i-497cxxxx using centos from aws market place with volumenew ID- vol-704axxxx
5.detach the volumenew from instance.
6.attach volumeold to instance and start the instance.

After doing all this my machine is working proper I am able to launch my applications on it.

Now, I can't log in with SSH. Whenever I try, it gives an error message: "Server refused your key."

  • 1
    Show us the error message. – Peter Nov 22 '14 at 9:04
  • Server refused your key this is the error message – Kaushil Rambhia Nov 23 '14 at 16:32
  • Solution which solved my problem was to use the old previous account instance ssh key and not the new key which i assigned while creating new instance. – Kaushil Rambhia Dec 28 '14 at 9:32

Use Userify to create corrected user accounts.

  1. Shut down your instance.
  2. Right click and choose "View/edit UserData script"
  3. Paste either the CloudInit or Shell Script deployments for Userify
  4. Paste your SSH Public key into your Userify Account
  5. Boot your instance
  6. Grant yourself root access by clicking "root" in Userify
  7. Wait 30 seconds and then log in and fix the problem.

The userdata script will install the Userify agent (shim) on your instance and create your user account (sudo-capable) so you can fix the issue. You'll also be able to update these user accounts anytime, remotely, or even remove them when you're not using them.

Note: if your user account that is already on the instance has the same username that you're using in Userify, Userify will not edit it or fix it since it's already on the instance and Userify leaves user accounts alone that it didn't create.

To fix this, you just need to log in with a temporary username instead. If you prefer to fix it so that Userify manages all of your accounts from now on, just log in (using the temporary user account) and delete your current user account. Once the current user account is gone, Userify will automatically create any missing accounts with the correct username.

| improve this answer | |
  • can u brief about this? i dint got what you are trying to say – Kaushil Rambhia Nov 23 '14 at 16:32
  • Sure, just edited w/ more detail! – fatal_error Nov 24 '14 at 17:22

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.