Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode v1.43 remote ssh cannot connect. v1.42 works

I am connecting to a CENTOS 7.4 machine from my MAC using remote ssh extension. Everything was working fine in v1.42. I updated to v1.43 yesterday and now VSCode cannot connect. I get following error and it 'hangs' till I select close remote connection. I switched back to v1.42 and it works. Anyone else seen this?

[11:48:35.614] stderr> Authenticated to 172.18.116.204 ([172.18.116.204]:22).
[11:48:35.704] > Warning: no access to tty (Bad file descriptor).
[11:48:35.707] > Thus no job control in this shell.
[11:48:36.308] stderr> stty: 
[11:48:36.308] stderr> standard input: Inappropriate ioctl for device
[11:48:36.309] stderr> 
[11:48:38.151] stderr> stty: 
[11:48:38.152] stderr> standard input: Inappropriate ioctl for device
[11:48:38.152] > ready: 552eb5fb743e
[11:48:38.180] > Linux 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017
[11:48:38.180] Platform: linux
[11:48:38.246] stderr> bash: line 1: syntax error near unexpected token `then'
[11:48:38.246] stderr> bash: line 1: `then'
[11:48:38.247] stderr> function: Command not found.
[11:48:38.247] > 552eb5fb743e: running
[11:48:38.248] stderr> COMMIT_ID=78a4c91400152c0f27ba4d363eb56d2835f9903a: Command not found.
[11:48:38.248] stderr> EXTENSIONS=: Command not found.
[11:48:38.249] stderr> TELEMETRY=: Command not found.
[11:48:38.263] stderr> export: Permission denied.
[11:48:38.282] stderr> ALLOW_CLIENT_DOWNLOAD=1: Command not found.
[11:48:38.282] stderr> VSCODE_AGENT_FOLDER: Undefined variable.
[11:48:38.283] stderr> _lock: Command not found.
like image 416
chanakaya Avatar asked Mar 11 '20 19:03

chanakaya


People also ask

How do I connect to VS Code remote?

In VS Code, select Remote-SSH: Connect to Host... from the Command Palette (F1, Ctrl+Shift+P) and use the same user@hostname as in step 1. If VS Code cannot automatically detect the type of server you are connecting to, you will be asked to select the type manually.

Where do I put SSH key in VS Code?

Add SSH key to your VM# In the previous step, you generated an SSH key pair. Select Use existing public key in the dropdown for SSH public key source so that you can use the public key you just generated. Take the public key and paste it into your VM setup, by copying the entire contents of the id_ed25519.

Can I SSH with VS Code?

VS Code Remote SSH SSH, or the secure shell protocol, lets you access a remote computer or virtual machine securely over a network connection. You can connect over SSH into another machine from Visual Studio Code and interact with files and folders anywhere on that remote filesystem.


1 Answers

This is an open issue in VSCode Remote-SSH version 0.50.0. See Issue #2527.

The way I resolved it was to downgrade to version 0.49.0.

  1. In VSCode, Ctrl+Shift+X to open extensions
  2. Click the Manage icon next to the Remote - SSH extension
  3. Click Install Another Version... from the options
  4. Select the version to install (0.49.0)

I also recommend disabling the Extensions Auto Update in settings so this type of thing doesn't happen in the future with this or any other extensions.

like image 62
Shawn Wonsmos Avatar answered Oct 07 '22 14:10

Shawn Wonsmos