Connecting to your Amazon EC2 server instance
There's no need for me to write step-by-step directions for creating the instance since Bitnami has already done a great job in providing instructions. It's quite simple and I didn't run into any issues creating the instance.Don't forget to open the SSH and HTTP ports for your server instance using the Security Groups function of the AWS Management Console. Once you open port 80 you will be able to access the default Tomcat web page in your browser via your instance's public DNS name (ie. http://ec2-107-20-221-246.compute-1.amazonaws.com).
Connecting to the new server instance is a little trickier, particularly for someone who isn't exactly a Unix/Linux guru. However, it's still relatively simple and again Bitnami has provided detailed instructions.
They key to connecting to your instance is the key. :) Well, key pairs to be exact. It's not just the key pair, you'll also need an SSH client like PuTTy. You will be prompted to create and download the key when you create your first EC2 server instance. Keep this file secure and do not lose it.
Here's the part that tripped me up: the key you download from AWS is not compatible with the PuTTy SSH client. AWS provides a key in .pem format and you'll need to convert it to the .ppk format that PuTTy can use. This excellent blog post provides details and instructions for converting the key and connecting with PuTTy.
Thanks for the nice article on our stack, just tweeted about it.
ReplyDeleteHey Daniel thanks for making the stack!
DeleteJustin: I had a question for you on your StackOverflow post regarding "How to return a partial JSON response using Java?". What would be the best way for me to ask this question - clearly it doesn't belong in this comment thread.
ReplyDeleteThanks so much - and sorry about the intrusion!
RB
Richard, if it's related to the SO post you can add a comment there. Otherwise, you can email me direct justinhrobbins at gmail.
ReplyDeleteHi,
ReplyDeleteFirst of all thanks lot for posting this information. It saved me a lot of headache.
I was able to install the bitnami tomcat stack onto amazon ec2 and the instance is running.
But I am having trouble connecting to the instance from my windows machine using putty.
I followed all the steps provided by the bitnami guide but I keep getting the following error when I try to open a connection with the instance.
server has refused our key along with a popup saying Disconnected:No supported authentication methods available(Server sent: publickey)
Could you please help me with this. It would be greatly appreciated.
Thanks
well described, succinct and well referred.
ReplyDeletePlease let me know how to get hold of the below password?
ReplyDelete" password: "
Hi,
ReplyDeleteI have deployed web app on AWS EC2 server (ubuntu) after successful deployment,i got the database connection.I am using MySQL database which is created by RDS where i am define database host name ,I am able to get connection when run that application from eclipse but after deployment i got some error:
1. com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
2.org.hibernate.exception.JDBCConnectionException: Cannot open connection
Please give me any solutions !!!!
Thanks
Vaibhav
Great blog... I found complete information on how to create AWS EC2 instance and for backup AWS backup EC2 instance is very helpful.
ReplyDelete