I have been trying to add my SSH keys to the ssh-agent by following the directions on this GitHub doc: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key
This is what I put into the terminal:
root@Nicoles-MacBook-Air nicoletr # eval "$(ssh-agent -s)"
Agent pid 21417
root@Nicoles-MacBook-Air nicoletr # open ~/.ssh/config
The file /var/root/.ssh/config does not exist.
root@Nicoles-MacBook-Air nicoletr # touch ~/.ssh/config
root@Nicoles-MacBook-Air nicoletr # open ~/.ssh/config
But when I hit enter to open the ~/.ssh/config file, the TextEdit app opens instead of a text file that I can modify. I am supposed to modify the config text file but I don't even see any file at all. I am still very new to coding so I would be extremely grateful for any guidance.
Open command
On MacOS, the
opencommand will open file in parameter with the default configured application for this filetype (such as Preview, TextEdit or Safari for some others)Even though you can override which application is used to open the file, there are more standard solutions to achieve this.
For the sake of completeness, you can override default app by using
-aoption, for example, if you want to open an html file with TextEdit instead of Safari by default:More information about open:
Alternative
If you would like to edit any file directly from your terminal, you can use packages such as
nano, to easily get started with it you can check this article. As an added bonus, it also go through settingbrewto easily install package, also from your terminalThere are alternatives to
nano(likevi,vim) and tobrew(such asmacports). They all have their pros and cons depending on the use, though in you case, I don't think your need would justify the steeper learning curve yetHappy discovering coding !