Pavan Varyani
Pavan Varyani

Reputation: 1526

VS Code remote server extension shows "attempting to reconnect"

I use Visual Studio Code and RemoteSSH extension to connect to a remote server located across the ocean via the corporate VPN, The connection gets established when I connect via my mobile hotspot, but it keeps showing "Attempting to reconnect" asking for password repeatedly when I use my broadband.

vs code error

I have compared the internet speed of both the service providers and below are the results.

1)Airtel hotspot(remote ssh works) 1)Airtel hotspot(remote ssh works)

2)Hathway broadband(remote ssh does'nt work) 2)Hathway broadband(remote ssh does'nt work)

From the above images it is evident that my broadband speed(upload and download) is much better than my internet hotspot speed, In spite of this I am unable to use remote ssh to code using my broadband network, Is there something that needs to be tweaked, or are the internet speed tests in a way inaccurate?

Upvotes: 2

Views: 3710

Answers (2)

SFB
SFB

Reputation: 21

I had similar experience and there are many threads on the subject, none of which resolved it for me.

I am working on a Windows laptop and connecting to remote Centos linux. I also connect to company network via their VPN.

I resolved it in the following manner, maybe not all steps are required, but this is what I did -but firstly, I setup ssh keys so as not to have to keep using a password, well worth the effort.

  • Updated the fileWatcher in code to ignore .git folder and venv folder, this improves performance
  • Updated WSL to WSL2
  • Install a linux shell on Windows - I was already using an Ubuntu one, installed prior to vscode, but hints online suggested installing it after vscode, so I installed the Kali shell.
  • Installed openssh-server (to get ssh-keygen) on kali
  • Launched code from the kali shell, let it do its setup
  • Even though all extensions were installed on both machine, vscode didn't recognize that and I had to use the option in the extension section to "install exentsions on remote server"

After that, every thing was fine. Hope that helps anyone else searching this problem.

Upvotes: 2

Vishwanath Dalawai
Vishwanath Dalawai

Reputation: 11

In Airtel hotspot, your public IP address remains the same. In case of Hathway broadband, public IP changes very frequently. So, if your VPN is redirecting you over IP, there may be possibility of delay because of authentication verification.

Upvotes: 1

Related Questions