Thursday, November 6, 2014

Amazon EC2: Authorizing Inbound Traffic for Your Instances

Amazon EC2: Authorizing Inbound Traffic for Your Instances


Adding a Rule for Inbound SSH Traffic to a Linux Instance


  • In the navigation pane of the Amazon EC2 console, click Instances. Select your instance and look at the Description tab; Security groups lists the security groups that are associated with the instance. Click view rules to display a list of the rules that are in effect for the instance.








  • In the navigation pane, click Security Groups. Select one of the security groups associated with your instance.
  • In the details pane, on the Inbound tab, click Edit. In the dialog, click Add Rule, and then select SSH from the Type list.






  • In the Source field, specify the public IP address of your computer, in CIDR notation. For example, if your IP address is 203.0.113.25, specify 203.0.113.25/32 to list this single IP address in CIDR notation. If your company allocates addresses from a range, specify the entire range, such as 203.0.113.0/24.
     Use the url  http://checkip.amazonaws.com/ to find you IP Address



  • Click Save.





Amazon EC2: Converting Your Private Key Using PuTTYgen

Amazon EC2: Converting Your Private Key Using PuTTYgen

PuTTY does not natively support the private key format (.pem) generated by Amazon EC2. PuTTY has a tool named PuTTYgen, which can convert keys to the required PuTTY format (.ppk). You must convert your private key into this format (.ppk) before attempting to connect to your instance using PuTTY.


To convert your private key

  • Start PuTTYgen (for example, from the Start menu, click All Programs > PuTTY > PuTTYgen).
  • Under Type of key to generate, select SSH-2 RSA.













































  • Click Load. By default, PuTTYgen displays only files with the extension .ppk. To locate your .pem file, select the option to display files of all types.






















  • Click OK
















  • Click Save private key to save the key in the format that PuTTY can use. PuTTYgen displays a warning about saving the key without a passphrase. Click Yes.

Note
A passphrase on a private key is an extra layer of protection, so even if your private key is discovered, it can't be used without the passphrase. The downside to using a passphrase is that it makes automation harder because human intervention is needed to log on to an instance, or copy files to an instance.






  • Specify the same name for the key that you used for the key pair (for example, my-key-pair). PuTTY automatically adds the .ppk file extension.



















  • Your private key is now in the correct format for use with PuTTY. You can now connect to your instance using PuTTY's SSH client.

Wednesday, November 5, 2014

Amazon Elastic EC2: Steps to launch an Amazon EC2 Instance

Amazon Elastic EC2: Steps to launch an Amazon EC2 Instance

This thread discusses the steps to launch a Linux instance using AWS Management Console.


  • To launch an Amazon EC2 instance, open the Amazon EC2 console using the URL https://console.aws.amazon.com/ec2
  • This will take you the following page.



























  • Click on Launch Instance
  • Select The Amazon Machine Image (AMI).  Select the 64 bit Amazon Linux AMI. Marked
















  • Select t1.micro from the instance type page. Click on Next: Configure Instance Details. This will navigate you to the "Configure Instance Details" Page















  • Click on Review and Launch.


















  • Select "Make General Purpose SSD the default boot volume for all instances from the console going forward " as the option.



  • Click on Edit Security Groups from the Review Instance Launch screen

















  • Select an existing security group. Select the check box and click on Review and Launch






  • Click on Launch



















  • Choose and Existing Key pair if the key pair exists OR create another pair of key.
  • Click on Launch Instance



  • On the Resource screen, click on Running Instance



Amazon EC2 : Connecting to Your Linux Instance from Windows Using PuTTY

Amazon EC2 : Connecting to Your Linux Instance from Windows Using PuTTY
  1. Start PuTTY (from the Start menu, click All Programs > PuTTY > PuTTY).
  2. In the Category pane, select Session and complete the following fields:
    1. In the Host Name box, enter user_name@public_dns_name. Be sure to specify the appropriate user name for your AMI. For example:
      • For an Amazon Linux AMI, the user name is ec2-user.
      • For a RHEL5 AMI, the user name is either root or ec2-user.
      • For an Ubuntu AMI, the user name is ubuntu.
      • For a Fedora AMI, the user name is either fedora or ec2-user.
      • For SUSE Linux, the user name is root.
      • Otherwise, if ec2-user and root don't work, check with the AMI provider.
    2. Under Connection type, select SSH.
    3. Ensure that Port is 22.

  3. In the Category pane, expand Connection, expand SSH, and then select Auth. Complete the following:
    1. Click Browse.
    2. Select the .ppk file that you generated for your key pair, and then click Open.
    3. (Optional) If you plan to start this session again later, you can save the session information for future use. Select Session in the Category tree, enter a name for the session in Saved Sessions, and then click Save.
    4. Click Open to start the PuTTY session.
  4. If this is the first time you have connected to this instance, PuTTY displays a security alert dialog box that asks whether you trust the host you are connecting to.
  5. (Optional) Verify that the fingerprint in the security alert matches the fingerprint that you obtained in step 1. If these fingerprints don't match, someone might be attempting a "man-in-the-middle" attack. If they match, continue to the next step.
  6. Click Yes. A window opens and you are connected to your instance


OCI Knowledge Series: OCI Infrastructure components

  Oracle Cloud Infrastructure (OCI) provides a comprehensive set of infrastructure services that enable you to build and run a wide range of...