amazon web services - Cannot SSH into EC2 instance because public DNS name is blank -


i'm trying ssh ec2 instance using command this:

ssh -i ~/.ssh/mykey.pem ubuntu@<ec2_public_dns_name> 

but, publicdnsname field showing blank on command line after create instance. have tried set dns hostnames yes in vpc dashboard (and terminated , created instance). have checked subnet , auto-assign public ip set yes.

where can find public dns name?

from you've described, instance has been stopped. if you're using aws command-line interface (cli), can query instance details including public dns hostname if know instance id:

aws ec2 describe-instances --instance-ids i-xxxxxxxx 

or, if know ami id instance created from:

aws ec2 describe-instances --filters "name=image-id,values=ami-xxxxxxxx" 

you should able review instances owned aws account visiting aws ec2 dashboard browser.


Comments

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -