Accessing my public key

hello, I have a basic question about getting started with AWS. I have windows terminal, and I can create the private and public keys just as it’s done in the lecture 0 video, but when I go to upload the public key in my AWS account, I can’t actually find the file to upload. I’m new to using the terminal and am unfamiliar with how these linux files are stored.

How do I access it from the file explorer so it can be uploaded?

Hi CQ, I’m not sure where (or how) they are stored either. Under step 3 on the AWS page (AWS EC2 | Practical Deep Learning for Coders) there’s a great tip that makes a copy of the key on your hard drive:

  1. Decide where you want to store the key and make sure that directory already exists on your hard drive. For this example I’ll use C:\UPLOAD (in all caps - I think it is case sensitive)

  2. Type this into your Windows terminal (example for the public key):
    cp .ssh/ /mnt/c/UPLOAD/
    replacing UPLOAD with the directory name you used, and possibly the drive letter (c) if you used a different drive

  3. Then go to Windows explorer and you should see a copy of the in C:\UPLOAD or whatever directory you used. You should be able to upload that.

As a side note, I had great difficulty installing WSL/Ubuntu at first (in Windows 10). Some note about requiring a kernel update. I found a nice resource that shows how to use WSL 2 here:

1 Like

Hi cq, it’s not clear from your message whether or not you’re using WSL. If you are, then all you need to do is type the "cd ~/.ssh " command to go to the directory where your keys are located.

If you can write down what you did to generate the pub/priv keys , it might shed some light on where those keys might be. If you’re using windows terminal to connect to your WSL or WSL2 (I’d recommend using WSL2 btw) instance on your Windows machine then the above command should take you to the directory (enter it on the shell commandline without the double quotes)

Good luck!

1 Like