Search code examples
amazon-web-servicesgithubsshrsacloud9

rsa public key No such file or directory?


I'm trying to follow along the Upskillcourses.com web dev online course. In lesson 11 I'm supposed to link up cloud9 to github.

I'm trying to get the SSH key. But it's not working:

ec2-user:~/environment $ cat ~/.ssh/id_rsa.pub
cat: /home/ec2-user/.ssh/id_rsa.pub: No such file or directory

I've copied it exactly like the instructor did. I'll be honest in that I don't really know what I'm doing or how to fix. Seems like no one else is having this problem. Thanks for any help


Solution

  • Use ssh-keygen to create a default ssh key pair, for now without passphrase:

    ssh-keygen -t rsa -C "MyEmailAddress" -f ~/.ssh/id_rsa -P ""
    

    Then any ssh command will use by default that key.