Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save b6pzeusbc54tvhw5jgpyw8pwz2x6gs/970bf5b96006303cd4795dab17bfaf10 to your computer and use it in GitHub Desktop.
Save b6pzeusbc54tvhw5jgpyw8pwz2x6gs/970bf5b96006303cd4795dab17bfaf10 to your computer and use it in GitHub Desktop.
VSCode remote ssh 접속 안되는 문제 해결 방법
#!/bin/bash
# Script to update VScode
# from https://github.com/Sheridan-Tech/Update_VScode
# ssh로 붙는 target server에서 아래 실행:
#grab the current commit id
COMMIT_ID=`ls -At ~/.vscode-server/bin | head -n 1`
cd ~/.vscode-server/bin/$COMMIT_ID
#unlock it
rm ./vscode-remote-lock*
#download package and unpack it
wget https://update.code.visualstudio.com/commit:$COMMIT_ID/server-linux-x64/stable
# 위주소가 접근이 안되고 있었음. 그래서 업데이트를 못해서 ssh 연결에 계속 실패했던 것으로 추정.
# 되는 환경에서 먼저 해보니 redirect url 이 나와서 그 url을 사용하니 다운로드 됨.
# 예: wget https://az764295.vo.msecnd.net/stable/fd6f3bce6709b121a895d042d343d71f317d74e7/vscode-server-linux-x64.tar.gz -O stable
tar -xvzf ./stable --strip-components 1
if [ $? -eq 0 ]; then
rm ./stable
echo "Successfully updated VScode"
else
echo "Failed to download and untar VScode update"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment