Page 1 of 1

(Solved) "admin" SSH problems - Debian 8 on AWS EC2

Posted: Mon Jul 11, 2016 1:38 pm
by mehargags
Hi,
I'm trying to install VestaCP on and Amazon Web Services EC2 Instance. You have to go to Amazon Market place and install Debian from there which creates the instance with "admin" user.

Now I can successfully install VestaCP with vst-install.sh --force but then it washes away the "admin" user's profile and RSA keys. I took backup of the public Key before installing the second time and restored it but now when I login using it, it shows
Using username "admin".
Server refused our key

What can be the problem ? -- what is the correct way of going about this ?

Re: (Solved) "admin" SSH problems - Debian 8 on AWS EC2

Posted: Mon Jul 11, 2016 6:15 pm
by mehargags
Well I solved it. Somehow the pubKey that I copied wasn't complete (wonder how). I used the command

Code: Select all

ssh-keygen -y
to retrieve the pubKey from my PEM file, put that in the authorized_keys and it worked flawless.

Ref: Retrieving the Public Key for Your Key Pair on Linux