1

I am trying to connect via SSH using the Remote SSH extension in VS Code. However, the message "Setting up SSH Host xxxxxxxx: ([details]) Initializing VS Code Server" keeps appearing and I cannot establish the connection. Is there a solution to this?

【Ubuntu】 VERSION=22.04.1 LTS (Jammy Jellyfish)

【VS Code】 Version: 1.78.0 Commit: 252e5463d60e63238250799aef7375787f68b4ee Date: 2023-05-03T20:09:46.685Z Electron: 22.4.8 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Linux x64 5.19.0-41-generic snap Sandboxed: No`

【Remote SSH】 v0.101.2023050515

【Error】

[13:39:51.761] Using SSH config file "/home/u104547051/.ssh/config"
[13:39:51.762] Remote command length: 6173/8192 characters
[13:39:51.762] Running script with connection command: ssh -T -D 37461 -o ConnectTimeout=15 -F '/home/u104547051/.ssh/config' 'ds2-vagrant' powershell
[13:39:52.199] "install" terminal command done
[13:39:52.201] Install terminal quit with output: 
[13:39:52.212] Resolver error: Error: Got bad result from install script
    at m.Create (/home/u104547051/.vscode/extensions/ms-vscode-remote.remote-ssh-0.101.2023050515/out/extension.js:1:584145)
    at t.tryInstall (/home/u104547051/.vscode/extensions/ms-vscode-remote.remote-ssh-0.101.2023050515/out/extension.js:1:681644)
    at async /home/u104547051/.vscode/extensions/ms-vscode-remote.remote-ssh-0.101.2023050515/out/extension.js:1:644110
    at async t.withShowDetailsEvent (/home/u104547051/.vscode/extensions/ms-vscode-remote.remote-ssh-0.101.2023050515/out/extension.js:1:647428)
    at async t.resolve (/home/u104547051/.vscode/extensions/ms-vscode-remote.remote-ssh-0.101.2023050515/out/extension.js:1:645160)
    at async /home/u104547051/.vscode/extensions/ms-vscode-remote.remote-ssh-0.101.2023050515/out/extension.js:1:720925
[13:39:52.230] ------

https://gyazo.com/a63d0496117e0a4ccca34642960f879f

・I confirmed that it is possible to establish an SSH connection using the SSH FS extension in VS Code.

・I also confirmed that I can establish an SSH connection in my local environment.

・I reinstalled VS Code.

mm_mm
  • 11
  • 2

1 Answers1

0

The issue was due to the remote host running CentOS version 6. By executing the following command on CentOS, the error was resolved and the connection became available:

On the official Visual Studio Code website, it is mentioned that for CentOS 6, it is necessary to update glibc and libstdc. https://code.visualstudio.com/docs/remote/linux#_updating-glibc-and-libstdc-on-rhel-centos-6

In my command, I have added "--no-check-certificate" to avoid any certificate errors.

# Update glibc
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-2.17-55.el6.x86_64.rpm --no-check-certificate
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-common-2.17-55.el6.x86_64.rpm --no-check-certificate
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-devel-2.17-55.el6.x86_64.rpm --no-check-certificate
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-headers-2.17-55.el6.x86_64.rpm --no-check-certificate
wget https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-utils-2.17-55.el6.x86_64.rpm --no-check-certificate
wget https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-static-2.17-55.el6.x86_64.rpm --no-check-certificate

sudo rpm -Uvh \
    glibc-2.17-55.el6.x86_64.rpm \
    glibc-common-2.17-55.el6.x86_64.rpm \
    glibc-devel-2.17-55.el6.x86_64.rpm \
    glibc-headers-2.17-55.el6.x86_64.rpm \
    glibc-static-2.17-55.el6.x86_64.rpm \
    glibc-utils-2.17-55.el6.x86_64.rpm --force --nodeps

# Update libstdc++
wget https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/gcc-4.8.2-16.3.fc20/libstdc++-4.8.2-16.3.el6.x86_64.rpm --no-check-certificate
wget  https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/gcc-4.8.2-16.3.fc20/libstdc++-devel-4.8.2-16.3.el6.x86_64.rpm --no-check-certificate
wget https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/gcc-4.8.2-16.3.fc20/libstdc++-static-4.8.2-16.3.el6.x86_64.rpm --no-check-certificate

sudo rpm -Uvh \
    libstdc++-4.8.2-16.3.el6.x86_64.rpm --force --nodeps \
    libstdc++-devel-4.8.2-16.3.el6.x86_64.rpm --force --nodeps \
    libstdc++-static-4.8.2-16.3.el6.x86_64.rpm --force --nodeps
mm_mm
  • 11
  • 2