Skip to Content
Programming Amazon Web Services
book

Programming Amazon Web Services

by James Murty
March 2008
Intermediate to advanced
604 pages
18h 38m
English
O'Reilly Media, Inc.
Content preview from Programming Amazon Web Services

Log In to an Instance

To log in to an instance with a Secure Shell connection, you must know the instance’s public DNS name or IP address; and the instance must be running in a security group that is configured to allow inbound network access to the Secure Shell daemon service on port 22. If the instance is configured to use keypair access credentials, you must also have the private key file corresponding to the keypair associated with the instance.

We will log in to our instance, which is located at the public DNS address ec2-67-202-4-222.z-1.compute-1.amazonaws.com, as the root user. At a console prompt, we will run the ssh Secure Shell command and provide our private key file as an identity file. Because we have encrypted our private key file, we will be prompted for a password when we try and use it.

$ ssh -i ec2-private-key.enc root@ec2-67-202-4-222.z-1.compute-1.amazonaws.com

You will most likely have to explicitly allow ssh to connect to this particular host for the first time by answering “yes” to the question about continuing the connection.

The authenticity of host 'ec2-67-202-4-222.z-1.compute-1.amazonaws.com 
(67.202.4.222)' can't be established.
RSA key fingerprint is f9:9c:3b:f2:f0:75:74:a9:10:5a:8a:18:74:48:63:55.
Are you sure you want to continue connecting (yes/no)? yes

Note

If this is the first time you have used your private key file, the ssh program may complain that this file has overly lax file permissions. If this happens you must set the appropriate permissions ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

AWS SysOps Cookbook - Second Edition

AWS SysOps Cookbook - Second Edition

Eric Z. Beard, Rowan Udell, Lucas Chan

Publisher Resources

ISBN: 9780596515812Errata Page