windows使用vscode基於ssh遠程登陸ssh開發錯誤:Permission denied, please try again.


解決參考辦法

VSCode Version: 1.43.0
OS Version: Windows 10
I want to access a remote VM with Remote - SSH extension from a Windows 10 machine. But I don't seem to succeed as VSCode is keeping prompting me to enter the password and deny the access each time. The VM runs on a Ubuntu 18.04 LTS OS.

I generated a ssh key for authentication and that's how I am able to acces the VM from the command line with a ssh client.

Steps to Reproduce:

1、I access normally the remote VM from MobaXterm.
2、I generate a ssh key in my windows 10 computer.
3、I Install the public key in the remote server.
4、I make sure that I can access the VM from the command line and it works fine.
5、I install the Remote - SSH extension on VSCode.
6、Press F1 > search and click Remote-SSH: connect to a host > execute command ssh username@ipaddress
7、VSCode launch a new instance and prompt me for the password of username@ipaddress.
8、I enter the password, and it prompts for the same reason with a message: Permission denied, please try again.
This is the output on VSCode:

[15:59:33.542] Showing password prompt
[15:59:33.543] Listening for interwindow password on \\.\pipe\vscode-ssh-askpass-d9c3e8222ce4d3d9ee41d8ec1b64bb868ac4183c-sock
[15:59:33.543] Writing password prompt to globalState
[15:59:46.762] Got password response
[15:59:46.763] Interactor gave response: *****
[15:59:46.763] Cleaning up other-window auth server
[15:59:48.746] stderr> Permission denied, please try again.
[15:59:48.915] Got askpass request: {"request":"ssh <username>@<ipaddress>'s password: "}
[15:59:48.916] Showing password prompt

參考地址:https://github.com/microsoft/vscode/issues/92579


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM