You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hiya,
I'm following your excellent guide on connecting to a development docker container on VSCode. Unfortunately, I keep getting the following error
[13:14:05.372] > root@localhost's password:
[13:14:05.373] Showing password prompt
[13:14:08.982] Got password response
[13:14:08.982] "install" wrote data to terminal: ""
[13:14:08.997] >
[13:14:09.005] > Permission denied, please try again.
The requirements of WSL2, OpenSSH (on Windows) and VSCode (with remote extensions plugin) are all satisfied. I tried creating SSH keys on WSL with and without passwords and both fail with the same error. My version of VSCode is 1.58.2.
If you have any suggestions, that would be great!
cheers,
Shrividya
The text was updated successfully, but these errors were encountered:
shriv
changed the title
Docker container as remote in VSCode
SSH key permission denied on Docker container as remote in VSCode
Jul 27, 2021
Sorry, I didn't get an email notification and didn't see this issue till just now.
It definitely seems the ssh keys don't match, since the whole point was to avoid the use of a password. If you're sure you're copying the keys out of ~/.ssh in your WSL2 distro then it should work. One way to check would be to connect to the container from the WSL2 terminal and then check the environment variables. So:
docker exec -it <name of container> /bin/bash
will get you to the terminal of the development container, and then you can just do:
echo"$PUB_KEY"
and
cat ~/.ssh/authorized_keys
These should match, and they should also match the contents of ~/.ssh/id_rsa.pub in your WSL2 distro. Note that vscode has extensions specifically for connecting to containers which might be a bit more streamlined, but I've not tested it out yet. Perhaps I'll update that post after I've tested it out.
Hiya,
I'm following your excellent guide on connecting to a development docker container on VSCode. Unfortunately, I keep getting the following error
[13:14:05.372] > root@localhost's password:
[13:14:05.373] Showing password prompt
[13:14:08.982] Got password response
[13:14:08.982] "install" wrote data to terminal: ""
[13:14:08.997] >
[13:14:09.005] > Permission denied, please try again.
The requirements of WSL2, OpenSSH (on Windows) and VSCode (with remote extensions plugin) are all satisfied. I tried creating SSH keys on WSL with and without passwords and both fail with the same error. My version of VSCode is 1.58.2.
If you have any suggestions, that would be great!
cheers,
Shrividya
The text was updated successfully, but these errors were encountered: