Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I delete all SSH keys from my Mac

Tags:

terminal

ssh

So I am starting bootcamp at the end of this month and I have pre course work until then. I have previously set up keys but I want to know how to delete all of them because, well I would just like to know. Basically when I command

ls -al ~/.ssh

I would like it to respond

total 0

Currently It's responding

total 8

Mostly the reason I'm asking is in the tutorial the instructor is saying he deleted all of them to start clean for the purpose of the video.

Here is the link to said video. https://youtu.be/5I1rlq7qkps

Thank you!

like image 583
Chris Sebastian Avatar asked Jan 20 '26 18:01

Chris Sebastian


2 Answers

You can do rm -rf ~/.ssh/* to remove everything in your .ssh folder.

like image 187
sportzpikachu Avatar answered Jan 26 '26 13:01

sportzpikachu


Also you could run ssh-add -D first. It makes me feel good, feels safer than only removing whole directory right off the bat

like image 32
Devin Rhode Avatar answered Jan 26 '26 11:01

Devin Rhode