You are not logged in.

#1 2024-03-30 09:14:16

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,899
Website

ssh .pub file issue [Solved]

Have recently updated my ssh keys for use with git, only when I commit I get the following message.

Warning: Identity file /home/mrgreen/.ssh/id_rsa not accessible: No such file or directory.

I have switched to using id_ed25519.pub [newly created key].

Made changes in config [.ssh/config] to reflect this:

User git
   Hostname gitlab.com
   IdentityFile ~/.ssh/id_ed25519
   TCPKeepAlive yes
   IdentitiesOnly yes

Am guessing I need to edit /etc/ssh/config... but I am not sure?

Last edited by Mr Green (2024-03-30 14:31:03)


Mr Green

Offline

#2 2024-03-30 09:44:54

impossibleveins23
Member
From: Israel
Registered: 2022-06-18
Posts: 121

Re: ssh .pub file issue [Solved]

AFAIU the directives in ssh_config starts with Host
Try:

Host gitlab.com
   User git
   Hostname gitlab.com <-- May not be necessary 
   IdentityFile ~/.ssh/id_ed25519
   TCPKeepAlive yes
   IdentitiesOnly yes

Source


* Good formatted problem description will cause good and quick solution smile
* Please don't forget to mark as [SOLVED].

Offline

#3 2024-03-30 12:43:18

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,899
Website

Re: ssh .pub file issue [Solved]

Still get that error message, I know file is not present in ~/.ssh... maybe a global thing?


Mr Green

Offline

#4 2024-03-30 12:47:44

impossibleveins23
Member
From: Israel
Registered: 2022-06-18
Posts: 121

Re: ssh .pub file issue [Solved]

* The error is pretty straight forward (the file does not exist). Does it?
* What happen if you specifically pass ssh -i path/to/private/key ...?


* Good formatted problem description will cause good and quick solution smile
* Please don't forget to mark as [SOLVED].

Offline

#5 2024-03-30 14:30:49

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,899
Website

Re: ssh .pub file issue [Solved]

Ran:

ssh-keygen -t rsa

And now file exists it seems to be working.

Guess I need to be a bit more careful ssh in the future....

Thanks for your help, marking as solved


Mr Green

Offline

Board footer

Powered by FluxBB