Trouble with generating SSH keys

Hi Github friends,

I’m trying to set up SSH key since Github has been announcing the old approach of staying logged in will be soon expired. I follow the guidelines, but the code doesn’t run as expected:

I think the command “$ touch ~/.ssh/config” supposed to help creating a file, like how it shows in the topic “Generating a new SSH key and adding it to the ssh-agent” in Github Docs.

Could anyone who is able to see what’s going on help me with the troubleshooting? Thank you so much!

The output of the first command in your screenshot shows that the ~/.ssh/ directory doesn’t exist. touch can’t create a file in a non-existing directory, so you need to create the directory first:

mkdir ~/.ssh/

You don’t need an empty SSH configuration file, though, it’s enough to create it when you actually want to add options.