Santhosh Raj
Santhosh Raj

Reputation: 153

Access Tomcat folders on AWS EC2 instance

I have an EC2 instance with the AWS provided Tomcat server environment. How do I access Tomcat folders on this instance? I need to check the contents of the default server.xml which resides inside Tomcat. I know the path of the server.xml, But I need to know how to access it from my local system.

Thanks, San

Upvotes: 0

Views: 2357

Answers (2)

Frederic Henri
Frederic Henri

Reputation: 53783

you can ssh into your EC2 instance and navigate to your tomcat installation.

If you've done a default Tomcat installation, the main folder will be /etc/tomcat{version}. You can review here for more details about files and folders

make sure to create an EC2 key pair

If you're using Windows: You'll need 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:

a. In Host Name, enter ec2-user@public_dns_name.

b. Ensure that Port is 22.

enter image description here

  1. In the Category pane, under Connection type, expand SSH, and then select Auth. Complete the following:

a. Click Browse.

b. Select the .ppk file that you generated for your key pair, as described in Create a Key Pair, and then click Open.

c. Click Open to start the PuTTY session.

  1. 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. Click Yes. A window opens and you are connected to your instance.

To connect to your instance from Linux or Mac OS X using SSH

  1. Use the ssh command to connect to the instance. You'll specify the private key (.pem) file and ec2-user@public_dns_name.

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

You'll see a response like the following.

The authenticity of host 'ec2-198-51-100-1.compute-1.amazonaws.com (10.254.142.33)'
can't be established.
RSA key fingerprint is 1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f.
Are you sure you want to continue connecting (yes/no)?

Enter `yes.

You'll see a response like the following.

Warning: Permanently added 'ec2-198-51-100-1.compute-1.amazonaws.com' (RSA) 
to the list of known hosts.

Upvotes: 1

Hazim
Hazim

Reputation: 1451

You need to ssh into the server. You can do that through your local system or throw AWS console by clicking connect after selecting an instance the ec2 instances menu

for details on how to ssh: link

Upvotes: 0

Related Questions