Amazon AWS/EC2

From Bibliotheca Anonoma
Revision as of 20:51, 30 January 2018 by Antonizoon (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Accessing Instance[edit]

You must change permissions of the key pair to 400.

chmod 400 /path/my-key-pair.pem
ssh -i /path/my-key-pair.pem [email protected]

Accessing Instances in Linux

Add Users[edit]

http://stackoverflow.com/questions/3260739/add-keypair-to-existing-ec2-instance

pam_ssh[edit]

Another handy thing to do is single-sign on. Now that you've authenticated once with your SSH private key, you might as well have it authenticate the password anyway, so you don't have to type it in yet again for sudo.

If you compromise your private key everything is f***ed anyway.

Hostname[edit]

Once you get a real domain, you should name your servers with it.

https://aws.amazon.com/premiumsupport/knowledge-center/linux-static-hostname/

Sources[edit]