Hands-On Python Deep Learning for the Web
上QQ阅读APP看书,第一时间看更新

Step 2: SSHing into your EC2 instance

Open up a terminal on your system and using cd, navigate to the directory that your abc.pem file is stored in.

If you're unfamiliar with the cd command, consider a scenario in which you are inside a folder named Folder1, which has the following contents:

Folder1 /
- Folder2
- Folder3
- File1.jpg
- File2.jpg

To access any files inside the folder named Folder2, you'll have to change your working directory to that folder. To do so, you can use the following example of the cd command:

cd Folder2
Note that this command only works when you're already inside Folder1, which can be reached with a similar usage of the cd command from anywhere on the system.

You can read more about the usage of any command on a Linux system by using the following command:

man <command>

For example, you can use the following:

man cd

Now, set the permissions required for SSH using the key file by entering the following:

$ chmod 400 abc.pem

Now, to SSH into your instance, you will need its public IP or instance public DNS. For example, if the public IP is 1.2.3.4, then use the following command:

$ ssh -i abc.pem ubuntu@1.2.3.4

The public IP of the AWS instance can be found on the details panel below the list of running instances on the AWS console in the EC2 management page.