joelspadin / vscode-remote-x11

Visual Studio Code extension that sets the DISPLAY environment variable in remote workspaces
39 stars 9 forks source link

Another All configured authentication methods failed like #10 #74

Closed RicoAfoat closed 1 year ago

RicoAfoat commented 1 year ago

Sorry to bother you all with a little bit silly problem,but I meet similar problem like #10 .But I have connected to my visual machine using vscode extension Remote SSH without password successfully(I have runssh-keygen and I have added my public key to my server's ~/.ssh/authorized_keys file).

I have searched the web but I failed to solve the problem.

Here's the log :

Setting up display for remote "ssh-remote".
Connecting with SSH. See Remote X11 (SSH) logs for more details.
Error: All configured authentication methods failed
Connecting to ra@192.168.225.128 port 22
Error: All configured authentication methods failed

I would appreciate if you could help me.

J-StrawHat commented 1 year ago

Hey bro, did you finally find a solution? I just had this problem and got stuck for a long time

RicoAfoat commented 1 year ago

Yes, and this is the 1st time that someone contact me via email from github😊. It was about 3 months ago.And I didn’t use his extension, and I succeeded in displaying X11 on my computer. The remote side, however, is a vitual machine on a PSSD. Sadly I haven’t bring it with me currently. So details may be not that clear. I will send you a extra email later today for more specific information, including some pictures maybe. Here’s the steps I used(at least I can remember this). Just for reference if you are really in a hurry. (You may search remote x11 on the Internet and you will find something more useful.) (Background information: I was finishing a coding task using java and electron on a vitural machine. And I know it sounds weird though…) (I assume there’s no problem with your ssh keys.) Rather than using Xming, I used VcXsrv instead.

  1. Edit your bashrc file on the remote side. It seems that you need a external ip address. Or the server should be in a Local Area Network same as the client side.

  2. Set your program’s launch.json file and set your ssh configurations.

  3. Launch the VcXsrv server. If you are sure there’s no hacker who is interested in your project, or you are brave enough, you can turn this on. (My clinet only succeeded in this way…But never mind it’s just a vitual machine on my computer. And there are a thick firewall and a strict NAT to protect me, it seems that it’s ok😊)

  4. Try to connect to your server side, use the command xeyes/xclock, if it succeed, it’s ok.

J-StrawHat commented 1 year ago

Wow, bro you are so nice!!!! Thanks for such a detailed and specific tutorial. I will try it later!

RicoAfoat commented 1 year ago
  1. Launch.json

  2. .bashrc

Just for reference. Hope it can work smoothly on your computer. By the way I remember that localipaddress(the displaying screen side):0.0 is a default method. And I have no idea what “0.0” means. And you may use a vpn tool if two sides are not in a LAN.

RicoAfoat commented 1 year ago

It seems that pictures in the email have been broken.

launch.json

.bashrc

Turn this on when you find it doesn't work. Not that safe though.

Turn this on maybe

J-StrawHat commented 1 year ago

Thank you so much! According to your steps, I finally succeeded in displaying X11 on my computer!

RicoAfoat commented 1 year ago

Thank you so much! According to your steps, I finally succeeded in displaying X11 on my computer!

You are welcome!