-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance instructions for logging into AWS Jenkins via PuTTY (#7865)
* Enhance Instructions for Logging into AWS Jenkins via PuTTY * Apply suggestions from code review Co-authored-by: Kevin Martens <[email protected]> * fix-modify new changes * applied suggestions * Update content/doc/tutorials/tutorial-for-installing-jenkins-on-AWS.adoc Co-authored-by: Zbynek Konecny <[email protected]> * Update content/doc/tutorials/tutorial-for-installing-jenkins-on-AWS.adoc Co-authored-by: Kevin Martens <[email protected]> * Update content/doc/tutorials/tutorial-for-installing-jenkins-on-AWS.adoc Co-authored-by: Kevin Martens <[email protected]> --------- Co-authored-by: Kevin Martens <[email protected]> Co-authored-by: Kris Stern <[email protected]> Co-authored-by: Zbynek Konecny <[email protected]>
- Loading branch information
1 parent
cff3470
commit 33b26cf
Showing
1 changed file
with
78 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,39 +179,53 @@ If either DNS resolution or DNS hostnames is *no*, select *Edit* and change the | |
|
||
The tool that you use to connect to your Linux instance depends on your operating system. | ||
|
||
* If your computer runs Windows, you will connect using PuTTY. | ||
* If your computer runs Windows, you will connect using OpenSSH (built into Windows 10 version 1809 and later). | ||
* If your computer runs Linux or Mac OS X, you will connect using the SSH client. | ||
|
||
These tools require the use of your key pair. | ||
Be sure that you have created your key pair as described in <<Creating a key pair>>. | ||
|
||
==== Using OpenSSH to connect to your instance (Windows) | ||
|
||
==== Using PuTTY to connect to your instance | ||
|
||
. From the *Start* menu, select *All Programs* > *PuTTY* > *PuTTY*. | ||
. In the *Category* pane, select *Session*, and complete the following fields: | ||
.. In *Host Name*, enter ec2-user@public_dns_name. | ||
.. Ensure that *Port* is 22. | ||
. Open a terminal or PowerShell window. | ||
. Use the `ssh` command to connect to the instance. | ||
You will specify the private key (.pem) file and ec2-user@public_dns_name. | ||
+ | ||
image::tutorials/AWS/ec2_putty.png[Amazon EC2 PuTTY selection] | ||
[source,bash] | ||
---- | ||
$ ssh -i /path/my-key-pair.pem [email protected] | ||
---- | ||
+ | ||
You will receive a response like the following: | ||
+ | ||
[source,bash] | ||
---- | ||
The authenticity of host 'ec2-198-51-100-1.compute1.amazonaws.com (10.254.142.33)' can't be | ||
established. | ||
. In the *Category* pane, expand *Connection*, expand *SSH*, and then select *Auth*. Complete the following: | ||
.. Select *Browse*. | ||
.. Select the .ppk file that you generated for your key pair, as | ||
described in <<Creating a key pair>> and then select *Open*. | ||
. Select *Open* to start the PuTTY session. | ||
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. | ||
+ | ||
image::tutorials/AWS/putty_select_key_pair.png[Selecting and opening a new PuTTY session] | ||
You will receive a response like the following: | ||
+ | ||
[source,bash] | ||
---- | ||
Warning: Permanently added 'ec2-198-51-100-1.compute1.amazonaws.com' (RSA) to the list of known hosts. | ||
---- | ||
|
||
==== Using SSH to connect to your instance | ||
==== Using SSH to connect to your instance (Linux/Mac) | ||
|
||
. Use the ssh command to connect to the instance. | ||
You will specify the private key (.pem) file and ec2-user@public_dns_name. | ||
+ | ||
[source,bash] | ||
---- | ||
$ ssh -i /path/my-key-pair.pem ec2-user@ec2-198-51- | ||
100-1.compute-1.amazonaws.com | ||
$ ssh -i /path/my-key-pair.pem [email protected] | ||
---- | ||
+ | ||
You will receive a response like the following: | ||
|
@@ -397,6 +411,52 @@ created so you do not continue to accrue charges. | |
|
||
. In the left-hand navigation bar of the Amazon EC2 console, select | ||
*Instances*. | ||
. Right-click on the instance you created earlier, and select *Terminate*. | ||
. Right-click on the instance you created earlier, and select *Terminate instance*. | ||
+ | ||
image::tutorials/AWS/terminate_instance.png[Terminating your AWS EC2 instance.] | ||
|
||
=== Optional: Using PuTTY (for older Windows versions or users who prefer PuTTY) | ||
|
||
If you are using an older version of Windows or prefer to use PuTTY, follow these steps: | ||
|
||
==== Prerequisites | ||
|
||
. Ensure you have PuTTY installed on your system. | ||
You can download it from the link:https://www.putty.org/[official website]. | ||
. If you generated a `.pem` key file in AWS, you will need to convert it to a `.ppk` file for use with PuTTY. To do this: | ||
.. Download and install PuTTYgen (included with PuTTY). | ||
.. Open PuTTYgen and select *Load*. | ||
.. Load your `.pem` file (you may need to select "All Files" in the file dialog to see it). | ||
.. Once loaded, select *Save private key* and save the file as a `.ppk` file. | ||
+ | ||
NOTE: If you already generated a `.ppk` file in AWS (by selecting the PuTTY-compatible format during key pair creation), you can skip this step. | ||
|
||
==== Connecting to Your Instance with PuTTY | ||
|
||
. From the *Start* menu, select *All Programs* > *PuTTY* > *PuTTY*. | ||
. In the *Category* pane, select *Session*, and complete the following fields: | ||
.. In *Host Name*, enter **`ec2-user@public_dns_name`**. | ||
Make sure to replace `public_dns_name` with the actual public DNS of your instance. | ||
+ | ||
IMPORTANT: You must prefix the public DNS name with `ec2-user@` to successfully connect to the instance. | ||
For example, if your public DNS is `ec2-198-51-100-1.compute-1.amazonaws.com`, enter `[email protected]`. | ||
+ | ||
.. Ensure that *Port* is 22. | ||
+ | ||
image::tutorials/AWS/ec2_putty.png[Amazon EC2 PuTTY selection] | ||
|
||
. In the *Category* pane, expand *Connection*, expand *SSH*, and then select *Auth*. Complete the following: | ||
.. Select *Browse*. | ||
.. Select the `.ppk` file that you generated for your key pair (either directly from AWS or converted using PuTTYgen). | ||
.. Select *Open* to load the key. | ||
. Select *Open* to start the PuTTY session. | ||
+ | ||
image::tutorials/AWS/putty_select_key_pair.png[Selecting and opening a new PuTTY session] | ||
|
||
==== Differences Between PEM and PPK Keys | ||
|
||
* **PEM Keys**: Used by OpenSSH and other SSH clients. These are text-based files that start with `-----BEGIN RSA PRIVATE KEY-----`. | ||
* **PPK Keys**: Used by PuTTY. These are binary files and are not compatible with OpenSSH without conversion. | ||
|
||
For more detailed instructions, refer to the official AWS documentation: | ||
link:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/connect-linux-inst-from-windows.html[Connecting to Your Linux Instance from Windows Using PuTTY]. |