Summary
This article will walk you though how to connect to your N2W instance using SSH. These steps can also be used to connect to any Linux instance in AWS including an N2W worker instance.
Description
1. Obtain the IP address and Private Key for the Instance:
First you will need to obtain the IP address of the N2W instance or Worker instance and connect to it using SSH/PuTTY. If you already have this information, skip ahead to the next section.
The IP address is found in the details of the N2W Instance or worker instance in your EC2 console. Login to your AWS account and then go to Services > EC2. Locate the instance you need the IP from. The IP address may be in the right column, or click on the instance in the list, then view the details in the lower pane, you will see the IP address listed there and several other places noted below.
Next you will need your .pem key that you created or used when you created the EC2 instance. For our purposes this would be the N2W instance .pem
You should have this .pem file saved someplace safe already. If you need to check the name of the key/.pem in use on the N2W instance, you can check it in the EC2 instance details within AWS. See below. You can right click on the instance in the EC2 dashboard and choose "Connect" and you will see the following information.
The above will give you the .pem file name in use, the DNS host name you can use to connect to the instance via SSH, and the username for SSH access. Make a note of this information, it will be needed in the following steps. However please note that the username used for SSH access for a N2W instance is not root, it is cpmuser. If you need root access you would need to use the sudo su command once you have connected using cpmuser.
2. Use PuTTY to convert the private key to use for an SSH connection
Once you have your .pem file for the instance you will need to download and install PuTTY and PuTTYgen. PuTTYgen is included and installed as part of PuTTY and it is used to convert the .pem to a .ppk file that can be used to configure PuTTY for SSH connections.
You can download the PuTTY suite here - PuTTY
To convert your private key/,pem file to a .ppk follow the steps below.
Open Puttygen.exe, in the first screen choose RSA for Type of key to generate. leave 2048 for "Number of bits in a generated key" and then click the load button. In the explorer window that opens, change the file type to All files (*.*) and then locate and choose your .pem file and click open.
You will see the following screen after opening your .pem file with PuTTYgen. Click Ok on the Notice.
Then click Save Private key as seen in the image below. You will get a warning about not including a passphrase, click OK and then in the explorer window that comes up, give your newly converted .ppk file a name and save it someplace safe.
Once it is saved you can close the PuTTYgen window. You now have a PuTTY Private key file that can be used to configure PuTTY to connect to your N2W instance or Worker instance.
3. Configure PuTTY to connect to the instance using the newly converted key
Open PuTTY.exe. In the Category pane, choose Session. In the session details enter the hostname or ip address of the N2W instance or the worker instance you want to connect to. Enter 22 for the port and choose SSH for the connection type.
Then click Connection in the category section on the left, expand and choose SSH, expand again and choose Auth. Here you can use the browse button to locate and choose the .ppk file you created and saved in the previous section.
Once you have completed the above information, go back to the category navigation on the left and choose Session again. You can save these settings for future use by entering a name and clicking Save. After clicking Save, the configuration should show up in the list and will be available to load on future uses.
4. Use PuTTY to connect to the instance and perform any actions needed
After configuring PuTTY in the previous section, click the Open button (shown in the illustration above) to open a connection to the instance you have configured.
You will see the login prompt similar to the below. If you are logging into N2W enter "cpmuser" for the username, if you are logging into a N2W Worker instance, enter "ubuntu" for the username.
You will now be logged into the instance using SSH and can begin entering commands.
If you need to make any changes that require root access you will need to switch to root using the following command: sudo su
Comments
0 comments
Please sign in to leave a comment.