r/github • • 1d ago

Question Setting up SSH

I'm on Linux MX and I'm having trouble connecting my computer to my repos, to clone and what-not.

I think I'm following the guide on it. I want to use GitFiend to manage my projects, but using got in the command line it first throws an key authentication error and asks if I want to continue anyway. I say yes and it creates a "known_hosts" file, but then throws a permission denied error.

I can't tell what I'm doing wrong. These were my steps:

1 - Created a ~/.ssh directory

2 - ssh-keygen -t ed25519 -C "teclo+teal@disroot.org"
Inserted "github" as the key file names and left without password (also tried my password for Github on other attempts)

3 - eval "$(ssh-agent -s)"

4 - ssh-add github

5 - ssh-add -L and echo "$SSH_AUTH_SOCK" as just checks, but they didn't seem to say anything I could recognize as a problem.

6 - created ~/.ssh/config and added

Host git@github.com
   ForwardAgent yes

7 - Opened ~/.profile and added ssh-add ~/.ssh/github

8 - The text in ~/.ssh/github.pub is added to GitHub.

0 Upvotes

8 comments sorted by

View all comments

Show parent comment

2

u/Teleconferences 1d ago

It’s 5 AM and I’m on my phone, but I swear your host in your .ssh/config is wrong and should just be “github.com” not “git@github.com”

2

u/Sal_Iko 19h ago

Yes, you are half right. Someone else gave me a complete solution and the problem was indeed the "config" file. Thank you.