Can't ssh into new instance with old volume, permission denied(publickey)

0 down vote favorite I couldn't ssh into my old instance (permission denied (public key) error), so i created a new volume (called backup) using a snapshot of this instance (same region) and created a new instance different key pair.

I was able to ssh

ssh -i "key_1.pem" [email protected] -v 

into this new instance, however after I attached the backup volume, I get the same problem as I did with the old instance, same error message too. I tried with different users bitnami, ec2-user and root.

OpenSSH_6.9p1, LibreSSL 2.1.8 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 21: Applying options for * debug1: Connecting to [xx.xx.xx.xx] port 22. debug1: Connection established. debug1: key_load_public: No such file or directory debug1: identity file key_1.pem type -1 debug1: key_load_public: No such file or directory debug1: identity file key_1.pem-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.9 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6 debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6 pat OpenSSH_6.6.1* compat 0x04000000 debug1: Authenticating to as 'ubuntu' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client [email protected] <implicit> none debug1: kex: client->server [email protected] <implicit> none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ecdsa-sha2-nistp256 SHA256:ftehW8FxcwP7dMeNeemE+AH0UdLDGsQ2crx8PHIpg/w debug1: Host '' is known and matches the ECDSA host key. debug1: Found key in /Users/WeizTeoh/.ssh/known_hosts:22 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Trying private key: key_1.pem debug1: Authentications that can continue: publickey debug1: No more authentication methods to try. Permission denied (publickey).

When I go onto the public ip, I see my old site showing. This must mean the backup volume was attached properly right? I ve read alot of forums saying the problem could be in mounting the volume, and proposed changes the the fs, however I cant ssh so I am stuck outside the server. I have also tried alot of methods suggested by other forums. Yes the key is correct, and I've tried with both the old and new key.

I am an amateur at developing so please go easy, and have been stuck on this for an embarrassing amount of time. Many thanks!


Category: ssh Time: 2016-07-29 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.206 (s). 12 q(s)