Reputation: 153
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
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
Start PuTTY (from the Start menu, click All Programs > PuTTY > PuTTY).
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.
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.
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