Timeline for Passwordless SSH login into WSL2 failing
Current License: CC BY-SA 4.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 18, 2022 at 22:45 | history | edited | vvMINOvv | CC BY-SA 4.0 |
cleaned up a bit
|
Jan 18, 2022 at 21:52 | vote | accept | vvMINOvv | ||
Jan 18, 2022 at 21:47 | history | edited | vvMINOvv | CC BY-SA 4.0 |
added more context
|
Jan 18, 2022 at 21:40 | comment | added | vvMINOvv |
@DanielB Thank you so much. Yea I might have misspoken there. ssh-copy-id is basically what I meant. Although it didn't seem like Win has ssh-copy-id so instead I ran something like type $env:USERPROFILE\.ssh\id_rsa.pub | ssh -p 2222 myUser@WLSip "cat >> .ssh/authorized_keys" I'll edit my post to include the ssh directory ls
|
|
Jan 18, 2022 at 19:20 | answer | added | NotTheDr01ds | timeline score: 5 | |
Jan 18, 2022 at 19:10 | comment | added | Daniel B |
Your best bet to diagnose problems like that is to run sshd in debug mode. You will see why the key is rejected. Also, do you know about ssh-copy-id ? Chances are, your home dir, .ssh dir or authorized_keys file have invalid permissions. Please provide the output of ls -al ~/.ssh .
|
|
Jan 18, 2022 at 19:08 | comment | added | vvMINOvv |
@Ramhound thanks! I've gone ahead and posted the entire sshd_config I've also mentioned the key permissions. To answer your other questions: 1. I mostly did them here to kinda "prove" that I have a clean setup and eliminate a piece of the puzzle 2. I do actually have SSH working directly into Win as you've mentioned, and am aware I could just run bash.exe but (I know I'm being a baby lol) I want to have these two worlds accessed separately. as for which key I'd like to use, to be honest either is fine, I was trying to provide more options I suppose
|
|
Jan 18, 2022 at 19:05 | review | Close votes | |||
Feb 2, 2022 at 3:01 | |||||
Jan 18, 2022 at 18:59 | history | edited | vvMINOvv | CC BY-SA 4.0 |
posted entire sshd_config file, thanks to @Ramhound's suggestion
|
Jan 18, 2022 at 18:48 | comment | added | Ramhound |
Post the entire sshd_config . Your key must have the proper permissions. Why did you generate a RSA and ED25519 key which one do you intend to use? Strongly suggest starting over and using the instructions listed here. Are you trying to make your WSL2 instance an OpenSSH Server? Why? Windows has that feature built-in
|
|
S Jan 18, 2022 at 18:38 | review | First questions | |||
Jan 18, 2022 at 19:37 | |||||
S Jan 18, 2022 at 18:38 | history | asked | vvMINOvv | CC BY-SA 4.0 |