What Do I Do If the Connection to a Remote Development Environment Remains in "Setting up SSH Host xxx: Downloading VS Code Server locally" State for More Than 10 Minutes?
Symptom
Possible Cause
The local network is faulty. As a result, it takes a long time to automatically install the VS Code server remotely.
Solution
Manually install the VS Code server.
- Obtain the VS Code commit ID.
- Download the VS Code server package of the required version. Select Arm or x86 based on the CPU architecture of the development environment.
Replace ${commitID} in the following link with the commit ID obtained in 1.
- For Arm, download vscode-server-linux-arm64.tar.gz.
https://update.code.visualstudio.com/commit:${commitID}/server-linux-arm64/stable
- For x86, download vscode-server-linux-x64.tar.gz.
https://update.code.visualstudio.com/commit:${commitID}/server-linux-x64/stable
- For Arm, download vscode-server-linux-arm64.tar.gz.
- Access the remote environment.
Switch to Terminal in VS Code.
Run the following command in VS Code Terminal to access the remote development environment:
ssh -tt -o StrictHostKeyChecking=no -i ${IdentityFile} ${User}@${HostName} -p ${Port}
Parameters:
- IdentityFile: Path to the local key
- User: Username, for example, ma-user
- HostName: IP address
- Port: Port number
- Manually install the VS Code server.
Run the following commands on the VS Code terminal to clear the residual data (replace ${commitID} in the commands with the commit ID obtained in 1):
rm -rf /home/ma-user/.vscode-server/bin/${commitID}/* mkdir -p /home/ma-user/.vscode-server/bin/${commitID}
Upload the VS Code server package to the development environment.
exit scp -i xxx.pem -P 31205 Local path to the VS Code server package ma-user@xxx:/home/ma-user/.vscode-server/bin
ssh -tt -o StrictHostKeyChecking=no -i ${IdentityFile} ${User}@${HostName} -p ${Port}
Parameters:
- IdentityFile: Path to the local key
- User: Username, for example, ma-user
- HostName: IP address
- Port: Port number
Take Arm as an example. Decompress the VS Code server package to $HOME/.vscode-server/bin. Replace ${commitID} in the command with the commit ID obtained in 1.
cd /home/ma-user/.vscode-server/bin tar -zxf vscode-server-linux-arm64.tar.gz mv vscode-server-linux-arm64/* ${commitID}
- Establish the remote connection again.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot