Unable to ssh with key pair [closed]

asked 2014-06-23 23:08:34 -0500

Deeptanshu gravatar image

updated 2014-06-24 01:14:46 -0500

Hi,

Now i am able to connect with the metadata service. But i am still unable to SSH into the instance with the key pair. Now the nature of the error is different as stated below. Please check and suggest any clue. Unable to fatch user-data .


adding dns 8.8.8.8

cirros-ds 'net' up at 7.30

checking http://169.254.169.254/2009-04-04/ins...

successful after 1/20 tries: up 7.59. iid=i-0000000e

failed to get http://169.254.169.254/2009-04-04/use...

warning: no ec2 metadata for user-data

found datasource (ec2, net)

Starting dropbear sshd: generating rsa key... generating dsa key... OK

/run/cirros/datasource/data/user-data was not '#!' or executable


Getting below result from instance regarding meta data

$ curl http://169.254.169.254/2009-04-04/met...

ami-id

ami-launch-index

ami-manifest-path

block-device-mapping/

hostname

instance-action

instance-id

instance-type

kernel-id

local-hostname

local-ipv4

placement/

public-hostname

public-ipv4

public-keys/

ramdisk-id

reservation-id


$ curl http://169.254.169.254

1.0

2007-01-19

2007-03-01

2007-08-29

2007-10-10

2007-12-15

2008-02-01

2008-09-01

2009-04-04

$ curl http://169.254.169.254/2009-04-04/met...

i-00000013$


$ curl http://169.254.169.254/2009-04-04/use...

<html>

<head>

title 404 Not Found</title>

</head>

<body>

404 Not Found

The resource could not be found.

</body>

</html>$


ssh -i test.pem ubuntu@X.X.97.8

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@ WARNING: UNPROTECTED PRIVATE KEY FILE! @

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Permissions 0644 for 'test.pem' are too open.

It is required that your private key files are NOT accessible by others.

This private key will be ignored.

bad permissions: ignore key: test.pem

Permission denied (publickey).

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Antonio G.
close date 2015-06-05 03:03:21.585887

Comments

Permissions 0644 for 'test.pem' are too open. Try and change permissions for the test.pem file to 0400.

KunalTPatil gravatar imageKunalTPatil ( 2014-06-24 02:23:09 -0500 )edit

Thanks

Issue resolved !

Deeptanshu gravatar imageDeeptanshu ( 2014-06-25 02:43:50 -0500 )edit