« Oracle Enterprise Pack for Eclipse 11gR1 released on Eclipse 3.5 and 3.4 | Main | Silicon Valley Code Camp Oct 3rd/4th: Oracle Track »

Accessing Amazon EC2 when your firewall doesn't allow VNC or Windows RDP (Remote Desktop Protocol)

Matt Demeusy's blog has a good intro about how to setup an EC2 instance to be accessed via Windows RDP (remote desktop) from your local windows machine.

How to connect to Amazon Linux instances from a windows machine:

  1. Login to the console.aws.amazon.com and in the Key Pairs section of the console, create a key pair and download it.
  2. convert Amazon key format for PuTTY with PuttyGen

    Putty does not understand the keypair that you downloaded Amazon. That’s not a major issue though, because PuttyGen is a program that converts the native file format into one that PuTTY will understand.
    Launch PuTTYGen, click on Conversions -> Import Key. Browse to c:\ec2 and locate the key you downloaded. It will have a .pem extension.
    If you wish, enter a passphrase in the fields provided by PuTTYGen; although we recommend skipping this step for the lab exercise.
    Finally, click on File -> Save Private Key to save the converted key in c:\ec2. Use the same base filename, so that MyKey.pem has a corresponding PuTTY file named MyKey.ppk. This best practice makes it easier to keep things organized later.


    This movie will step you through how to use PuTTY Gen on windows to generate and import your key.  It covers PuTTY Gen and PuTTY from about 4:12 – 4:50 in the movie. Just do the PuTTY Gen step.

     

  3. Select the running instance from the amazon console at http://console.aws.amazon.com and look in the details pane, and copy and paste the public DNS name into PuTTY. (Data in the screenshots are strictly examples).
    Hands on Lab Environment - Oracle Wiki
  4. Then save it to a named profile. (Data in the screenshots are strictly examples)
    Hands on Lab Environment - Oracle Wiki
  5. Then specify your MyKey.ppk PPK file from step 9, as shown below. Save your changes to the same connection profile.  You may need to use PuttyGen to convert the key to putty format before using.
    Hands on Lab Environment - Oracle Wiki
  6. If applicable, specify a proxy server in the Connections > Proxy in the PuTTY settings. Save your changes to the same connection profile.
  7. Hands on Lab Environment - Oracle Wiki
  8. Tunnel VNC (if applicable)

Some firewalls may block vnc on port 5901. If you can connect on SSH, you can use the port forwarding feature of PuTTY to get around this. Realize that if you are tunneling, VNC will depend on the SSH session being open / logged in to work. Setup the tunnel in PuTTY, then connect your vnc client to 127.0.0.1:1 as shown below. If you were already connected on SSH before making this change, make the change, save it, and disconnect / reconnect.
Hands on Lab Environment - Oracle Wiki
Hands on Lab Environment - Oracle Wiki

  • Connect!

    Then try to connect by double clicking on the profile name. The first time you successfully connect, you will get a message about adding the keyfile to a cache. Say yes when prompted. It will prompt you for the login ID after accepting the key, and the username is always root. There is no password as you are using an encrypted key instead of a password.


    Connection troubleshooting:

    • Make sure you specified the path to your key (*.ppk) file in the SSH/Auth section
    • Most often the issue is a hang / timeout. This usually means a network problem, or the instance didn’t boot properly.
    • If you have a proxy that you normally use for your browser, you must specify it in the connection/proxy section, and remember to save the change to your profile so you don’t have to re-enter it every time.
      • Double check your security groups and make sure they allow port 22. Consider where you are connecting from, and whether or not you are actively using VPN or not. Some companies have proxies, so if you’re on VPN you may need to specify your proxy.
      • Try stripping out the DNS name and just use the IP. If the public DNS name is ec2-75-101-146-205.compute-1.amazonaws.com then the IP would be 75.101.146.205. You may want to do this anyway to eliminate DNS as a potential source of issues.
      • Remember that ping will not work with amazon, so don’t bother
    • Last resort, use elasticfox to check the STOUT console output and ensure that the instance booted properly.

    Technorati Tags: ,,,,

    del.icio.us Tags: ,,,,

     

     

  • TrackBack

    TrackBack URL for this entry:
    http://blogs.oracle.com/mt/mt-tb.cgi/13250

    Post a comment

    (If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

    About This Entry

    This page contains a single entry from the blog posted on August 10, 2009 8:38 AM.

    The previous post in this blog was Oracle Enterprise Pack for Eclipse 11gR1 released on Eclipse 3.5 and 3.4.

    The next post in this blog is Silicon Valley Code Camp Oct 3rd/4th: Oracle Track.

    Many more can be found on the main index page or by looking through the archives.

    Powered by
    Movable Type and Oracle