Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Unable to ssh with key pair

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/instance-id

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

failed to get http://169.254.169.254/2009-04-04/user-data

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

Unable to ssh with key pair

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/instance-id

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

failed to get http://169.254.169.254/2009-04-04/user-data

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/meta-data

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/meta-data/instance-id

i-00000013$


$ curl http://169.254.169.254/2009-04-04/user-data

<html>

<head>

title 404 Not Found</title>

</head>

<body>

404 Not Found

The resource could not be found.

</body>

</html>$


Unable to ssh with key pair

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/instance-id

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

failed to get http://169.254.169.254/2009-04-04/user-data

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/meta-data

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/meta-data/instance-id

i-00000013$


$ curl http://169.254.169.254/2009-04-04/user-data

<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).