could not establish connection to "서버ip": the remote host does not meet the prerequisites for running vs code server.
2시간 30분 삽질 완료^^
그래도 해결했으니 진짜 다행...........
문제 상황
오늘 출근해서 VS Code에서 Remote - SSH 기능을 사용하려고 했는데,
SSH로는 접속이 잘 되는데도 불구하고 아래와 같은 에러 메시지가 반복적으로 발생하였음.
(분명 어제까지는 멀쩡하게 접속이 되었단 말이지.ㅠㅠㅠ)
"원격 호스트가 VS Code Server를 실행하기 위한 필수 구성 요소를 충족하지 않습니다."
나의 환경
로컬 OS: macOS Sonoma 14.4.1 (Darwin x64 23.5.0, Apple Silicon)
로컬 VS Code 버전: 1.99.2 (최신 버전)
서버 OS: Ubuntu 18.04 LTS (glibc: 2.27 / Node.js: v14.16.0)
시도했던 해결 방법들 (실패)
- /etc/hosts 정리
- 환경 변수 / 프록시 확인
- .zshrc / .bashrc 초기화
- known_hosts 삭제
- VS Code 초기화 & 재설치
- settings.json 수동 생성
- Remote-SSH 확장 재설치
→ 모두 실패.
원인은 glibc 2.27 환경에서 VS Code 최신 버전이 원격 서버 환경을 차단하기 때문.
최종 해결 방법
결론부터 말하자면, "VS Code 버전 다운그레이드 + 자동 업데이트 비활성화"가 답이었습니다.
해결 순서 정리
1. VS Code 1.85.1 버전 설치 (기존에 설치 되어있는 Vs Code는 제거해주었음)
# 기존 VS Code 삭제
sudo rm -rf /Applications/Visual\ Studio\ Code.app
2. 업데이트 모드 끄기 (처음에 이거 안했더니 자동 업데이트 되서 다시 설치함^^)
VS Code 실행 → Cmd + , → "업데이트" 검색 → 응용 프로그램 > 업데이트 모드: "none" 으로 설정
3. 확장 프로그램에서 Remote - SSH 를 제거 후 다시 설치
4. 서버 접속 완료
참고
The remote host may not meet vs code server's prerequisites for glibc and libstdc++ vscod
I was working on the host server. Everything was great till yesterday and today when I start my server, suddenly error occurs in VS code. And my server is not connecting anymore. What should I do? ...
stackoverflow.com
The remote host may not meet VS Code Server's prerequisites for glibc and libstdc++ · Issue #9501 · microsoft/vscode-remote-re
There was no problem with remote SSH until 3 days ago. Now I'm getting the following error and I can't connect to the server The remote host may not meet VS Code Server's prerequisites for glibc an...
github.com