![]() We went over where to get the IP address for the EC2 instance in WordPress on Amazon EC2: Launch an EC2 Instance to Create a WordPress Site and in WordPress on Amazon EC2: IP and Domain-Name Addressing. I got this information from Bitnami’s own documentation. ![]() The username ( bitnami) and host address ( .com) of the EC2 instance we are connecting to.If you wanted to use this command from a different directory, you would need to use the complete file path to the private key (in this example, /Users/techwriter/.ssh/test_234.pem or ~/.ssh/test_234.pem). ssh) as the private key, we do not need the file path. Since we were are currently in the same directory (. -i: The identity-file, in this case the private key.Ssh -i "test-234.pem" ssh: The SSH command. Use the ssh command to connect to the EC2 instance:.Now we have secured the private key’s permissions, we need to add it to the computer’s SSH user agent:.Some users may even use the chmod command with the 0400 option, so that even the file’s owner can only read it. Note: If you make any edits to your private key, you will corrupt it, and without a copy of the original, you will lose your ability to connect to your EC2 instance.The permissions means that the owner can read and write to the file, but that no other users can read, write, or execute it. List the file permissions for the directory again with ls -al and look at the ownership and permissions for test_234.pem.Use the chmod command to change the permissions on the private key so that it cannot be modified by other users:.Mv /Users/techwriter/Downloads/test_234.pem /Users/techwriter/.ssh/test_234.pem Use the mv command to move it to the new. In this tutorial the name of the private key is test_234.pem and it is in the Downloads directory. Do you remember in the first section when I downloaded the key pair and said that private key needed to be safely kept? We’re going to use that private key now.ssh directory, so we create it with the mkdir (make directory) command and then list the contents of the directory again to make sure the. ssh directory within the user’s home directory. The l option displays details of each item in the long format, including permissions, ownership, and other metadata.) so that you can see all of the contents of the directory. The a option displays “hidden” files and directories that begin with a dot (.The list command, ls, is used to list the contents of directories and may be the command you use the most. ![]() This is the “home” directory for the techwriter user account. In this example, the output is /Users/techwriter. To find out where you are, type pwd for present working directory (or folder).
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |