I've been trying to get it to connect to my github, but keep getting an error. I think it thinks I'm a different user :( ... (don't ask why i have two similarly named users, i don't even know anymore...)

debug1: key_load_public: No such file or directory
debug1: identity file /home/solarmew/.ssh/id_rsa type -1

because there's definitely a C:\Users\solar\.ssh\id_rsa.pub

I can't figure out how to switch or how to get to that file :(

closed as too broad by Isaac, user88036, Thomas, Romeo Ninov, Anthony Geoghegan Oct 12 '18 at 22:50

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Welcome to U&L! Your question doesn't provide enough information to work out what the problem is. How are you attempting to connect to github -- what is the exact command that you run when this message appears? Is there any other output? Does the same identity file work from other machines? – JigglyNaga Oct 10 '18 at 20:53
  • @JigglyNaga, hi! Sorry, i was using ssh -vT git@github.com I don't have other machines to try it on unfortunately – Raksha Oct 10 '18 at 21:15
  • @JigglyNaga I added more stuff. Let me know if you have any suggestions please. – Raksha Oct 10 '18 at 21:40
  • 2
    The error output you posted is because your script has CRLF line endings. It's not related to the title question. – Michael Homer Oct 10 '18 at 22:30
  • 1
    I'm saying the : Permission deniedgitfiti.sh: cannot create /dev/null and surroundings is another (perfectly valid) question and better separated out from the one about getting your private key copied into the WSL environment, which is what the start & end of the question is about. The original question seems to have been answered, you just need to chmod -R go-rwx ~/.ssh afterwards to fix the permissions. You're likely still to have your other problem at that point and you can ask a second question for it, but SSH should find your keyfile. – Michael Homer Oct 11 '18 at 6:54

Your Windows "home" directory (e. g. C:\Users\YourName\) is not your WSL home directory (e. g. /home/yourname). Copy your SSH key from your Windows home into your WSL home and it should work properly.

  • how do I get to it? sorry, I've never used this before, so I don't really know how it works :< – Raksha Oct 10 '18 at 20:13
  • Open your WSL shell, and you will by default be in your home directory. Run the command cp -pr /mnt/c/Users/yourusername/.ssh ./.ssh. – DopeGhoti Oct 10 '18 at 20:18
  • that copies the whole ssh folder from windows to wsl ssh folder? It's still saying it can't find the id_rsa file – Raksha Oct 10 '18 at 20:22
  • 2
    cp -pr is unlikely to work here because it will create everything 777 and ssh won't like it. You'll need to fix up the permissions afterwards. – Michael Homer Oct 10 '18 at 21:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.