Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ssh No such file or directory

I had to wipe out my Windows OS. I went to check if I had ab ssh still and there was none so I created one.

Went through the proper steps and even got the agent ID.

Now when I try and find the id/rsa/pub using bash it tells me no file or directory.

But I can find that ssh file using my file explorer. Trying to get ssh keys to reload up to my GitHub and Heroku.
After searching stackoverflow I did find an article saying to run the command env|grep HOME and make sure HOMEDRIVE=C: was set to HOMEDRIVE=C:Users/Samson/ but mine is not.

If that is the correct fix how do i set HOMEDRIVE=C: = to Users/Samson/

I am on a Windows Machine

If that isn't the correct fix, I'm open to suggestions. I am extrememly green to this. enter image description here enter image description here

like image 856
sltdev Avatar asked Dec 10 '25 21:12

sltdev


2 Answers

Problem

There are two problems in the attempt to display the ssh public key, shown in the screenshot:

  • No command is used, the file path is entered directly. The command cat may be used for this purpose.
  • The file path is incorrect: id_rsa/pub instead of id_rsa.pub.

Solution

In order to view the public key file content, try the following command in bash:

cat ~/.ssh/id_rsa.pub

Otherwise, you may simply open the file from windows explorer, using a text editor (e.g. notepad).

like image 152
Mehdi Avatar answered Dec 12 '25 11:12

Mehdi


You have to generate key first Use this command to generate key
ssh-keygen -t rsa -b 4096 -C "[email protected]" Enter the above email which you have in you github. And now press enter and then you key will generate, and you will be able to acquire you ssh key This command -- ssh-keygen -t rsa -b 4096 -C "[email protected]"

like image 43
Mohammad Fahad Khan Avatar answered Dec 12 '25 11:12

Mohammad Fahad Khan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!