The local network is faulty. As a result, it takes a long time to automatically install the VS Code server remotely.
Manually install the VS Code server.
https://update.code.visualstudio.com/commit:${commitID}/server-linux-arm64/stable
https://update.code.visualstudio.com/commit:${commitID}/server-linux-x64/stable
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
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}