Funkigamoses
Posts: 14
Joined: Sat Jul 20, 2013 11:55 am

ssh-keygen -R problems

Mon Dec 02, 2013 11:54 am

Hello everyone!

I'm trying to connect to my Raspberry Pi, running NOOBS, via my iMac. I am using the x11 terminal.



This is what I get:

bash-3.2$ ssh-keygen -R ***.***.*.**
fopen: No such file or directory

(* = I.P)

Does anybody know why this happen? I can connect to my Raspberry Pi via my macbook, but not my iMac... The reason why I want to connect via my iMac is because I can't enter the GUI from my macbook, for some reason...

I've tried googling and searching on the forum, but can't find a thread about this problem, so I decided to make one, if it happens to exist a similair one, please feel free to lock the thread.


BR
Henrik

DBryant
Posts: 281
Joined: Sat Feb 02, 2013 12:41 pm
Location: Berkshire, UK

Re: ssh-keygen -R problems

Mon Dec 02, 2013 12:08 pm

Are you sure the .ssh directory actually exists for the user account in question?
If it doesn't, then you will get "fopen: No such file or directory"

Funkigamoses
Posts: 14
Joined: Sat Jul 20, 2013 11:55 am

Re: ssh-keygen -R problems

Mon Dec 02, 2013 12:37 pm

Hmm, tell me more about that! I have enabled ssh on my Raspberry Pi, I am sure of that, and I can connect to it from my macbook.

But do you create an ssh directory on each computer? I'm sorry if this sounds so noobish. How do I create an ssh-directory for the user account?


Thank you for answering!

DBryant
Posts: 281
Joined: Sat Feb 02, 2013 12:41 pm
Location: Berkshire, UK

Re: ssh-keygen -R problems

Mon Dec 02, 2013 1:35 pm

From the command line the .ssh directory would be created when you create the keys for the user, for example with the command:

Code: Select all

ssh-keygen -t rsa
Note this is not sudo-ed, you are creating the keys for yourself i.e. the account you logged into. That will create the directory with the required permissions (700) - your could

Code: Select all

mkdir .ssh
chmod 700 .ssh 
if you wish, but then the keys themselves would have to be generated. And yes, they have to be created for each user, on each system, that wishes to partake of the ssh service.
Don't recall if enabling ssh will do the above automagically; it could be simply starting the ssh daemon. Been a time since I've done anything do it myself.

Return to “Troubleshooting”