amazon web services - can't connect to ec2 anymore - Permission denied (publickey) - but was working yesterday -
i've tried previous answers previous similar questions here. none worked.
until yesterday login ec2 instance, today can't, using same key. server did not restart, , using same dns. i've tried using ip or server address.
have tried on http://docs.aws.amazon.com/awsec2/latest/userguide/troubleshootinginstancesconnecting.html
it started mysql going down. logged in fixed, created backup , trying copy backup thru scp. started getting permission denied, ssh started receiving permission denied. blog still , running, can't log in server nor copy backup file.
using command:
ssh -vvv -i "key.pem" ec2-user@ec2-52-67-93-144.sa-east-1.compute.amazonaws.com
i get:
openssh_6.2p2, osslshim 0.9.8r 8 dec 2011 debug1: reading configuration data /etc/ssh_config debug1: /etc/ssh_config line 20: applying options * debug2: ssh_connect: needpriv 0 debug1: connecting ec2-52-67-93-144.sa-east-1.compute.amazonaws.com [52.67.93.144] port 22. debug1: connection established. debug3: incorrect rsa1 identifier debug3: not load "key.pem" rsa1 public key debug1: identity file key.pem type -1 debug1: identity file key.pem-cert type -1 debug1: enabling compatibility mode protocol 2.0 debug1: local version string ssh-2.0-openssh_6.2 debug1: remote protocol version 2.0, remote software version openssh_6.6.1 debug1: match: openssh_6.6.1 pat openssh* debug2: fd 3 setting o_nonblock debug3: load_hostkeys: loading entries host "ec2-52-67-93-144.sa-east-1.compute.amazonaws.com" file "/users/pedroisrael/.ssh/known_hosts" debug3: load_hostkeys: found key type rsa in file /users/pedroisrael/.ssh/known_hosts:13 debug3: load_hostkeys: loaded 1 keys debug3: order_hostkeyalgs: prefer hostkeyalgs: ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-rsa debug1: ssh2_msg_kexinit sent debug1: ssh2_msg_kexinit received debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-rsa,ssh-dss-cert-v01@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-dss debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519 debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,zlib@openssh.com debug2: kex_parse_kexinit: none,zlib@openssh.com debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: mac_setup: found hmac-md5-etm@openssh.com debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none debug2: mac_setup: found hmac-md5-etm@openssh.com debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none debug1: ssh2_msg_kex_dh_gex_request(1024<1024<8192) sent debug1: expecting ssh2_msg_kex_dh_gex_group debug2: dh_gen_key: priv key bits set: 128/256 debug2: bits set: 517/1024 debug1: ssh2_msg_kex_dh_gex_init sent debug1: expecting ssh2_msg_kex_dh_gex_reply debug1: server host key: rsa 96:ba:5c:04:98:ea:b7:d3:0d:1f:d8:01:4c:23:d1:d6 debug3: load_hostkeys: loading entries host "ec2-52-67-93-144.sa-east-1.compute.amazonaws.com" file "/users/pedroisrael/.ssh/known_hosts" debug3: load_hostkeys: found key type rsa in file /users/pedroisrael/.ssh/known_hosts:13 debug3: load_hostkeys: loaded 1 keys debug3: load_hostkeys: loading entries host "52.67.93.144" file "/users/pedroisrael/.ssh/known_hosts" debug3: load_hostkeys: found key type rsa in file /users/pedroisrael/.ssh/known_hosts:13 debug3: load_hostkeys: loaded 1 keys debug1: host 'ec2-52-67-93-144.sa-east-1.compute.amazonaws.com' known , matches rsa host key. debug1: found key in /users/pedroisrael/.ssh/known_hosts:13 debug2: bits set: 509/1024 debug1: ssh_rsa_verify: signature correct debug2: kex_derive_keys debug2: set_newkeys: mode 1 debug1: ssh2_msg_newkeys sent debug1: expecting ssh2_msg_newkeys debug2: set_newkeys: mode 0 debug1: ssh2_msg_newkeys received debug1: roaming not allowed server debug1: ssh2_msg_service_request sent debug2: service_accept: ssh-userauth debug1: ssh2_msg_service_accept received debug2: key: key.pem (0x0), explicit debug1: authentications can continue: publickey debug3: start over, passed different list publickey debug3: preferred publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: next authentication method: publickey debug1: trying private key: key.pem debug1: read pem private key done: type rsa debug3: sign_and_send_pubkey: rsa bb:c8:d5:38:c8:87:74:30:be:05:0c:8c:52:77:77:9c debug2: sent publickey packet, wait reply debug1: authentications can continue: publickey debug2: did not send packet, disable method debug1: no more authentication methods try. permission denied (publickey).
have no idea on how proceed! can help? goal connect server again. or @ least copy backup file create new instance if necessary.
launch new instance, prepare (mysqld..). stop old instance, detach volume , attach new instance. restore backup.
this involves downtime, can pretty short. if unsure detach/attach/mount procedure, try first other instances.
Comments
Post a Comment