简体   繁体   中英

After Establishing a Remote-ssh connection to the server, it appears the vscode-server does not finish the installation

I am using the Remote-ssh extension with VS Code (Insiders) to connect to an AWS Linux server. This connection is authenticated with a SSH key stored on my local machine. After I connect, a terminal titled "install" is opened and the following is the output:

685ad2d6d150: running
Acquiring lock on /home/ubuntu/.vscode-server-insiders/bin/45aafeb326d0d3d56cbc9e2932f87e368dbf652d/vscode-remote-lock.ubuntu.45aafeb326d0d3d56cbc9e2932f87e368dbf652d
Found existing installation at /home/ubuntu/.vscode-server-insiders/bin/45aafeb326d0d3d56cbc9e2932f87e368dbf652d...
Checking /home/ubuntu/.vscode-server-insiders/.45aafeb326d0d3d56cbc9e2932f87e368dbf652d.log and /home/ubuntu/.vscode-server-insiders/.45aafeb326d0d3d56cbc9e2932f87e368dbf652d.pid for a running server
Looking for server with pid: 79962
Found running server...

*
* Reminder: You may only use this software with Visual Studio family products,
* as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
*

Checking server status on port 45093 with wget
685ad2d6d150: start
SSH_AUTH_SOCK====
DISPLAY====
webUiAccessToken====
listeningOn==45093==
osReleaseId==ubuntu==
arch==x86_64==
tmpDir==/run/user/1000==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
extInstallTime====
serverStartTime====
connectionToken==86be68cd-ee77-49dc-ae26-5c1521022c2c==
685ad2d6d150: end

(this print is after the initial install and reconnecting to the server, but the output is about the same)

Afterwards the "install" terminal remains open. If I close it, then it seems my connection is interrupted and trying to open a file, or another Bash terminal reopens the install terminal.

If I open a direct connection to the user directory, I get the following warning:

警告图标的屏幕截图

扩展想要对终端的环境做如下改动

If I open a connection from within a git repository directory I don't get that warning.

My question is, is the vscode-server-insiders "install" finished? Is the "install" terminal supposed to remain open the entire time? If I close the "install" terminal, is it supposed to break the connection and reopen? Is the warning that shows up because I am not in a git repository directory? Should I be getting that warning? Or is this all the normal process of remotely connecting via ssh with VS Code?

Sorry, I have Googled, but have not seen anything referencing that this is the regular behavior of using the Remote-ssh extension. I feel like if the vscode-server-insiders installation was completed that the "install" output in the terminal should go away. But it seems to hang after the connectionToken==86be68cd-ee77-49dc-ae26-5c1521022c2c==4134564d6c5d: end output. Just trying to figure out if this is indeed what is supposed to happen.

UPDATE 1: As mentioned by @VonC, it appears that the install process is indeed hanging. I had already looked at the Troubleshooting hanging or failing connections documentation and added "remote.SSH.showLoginTerminal": true, "remote.SSH.useLocalServer": false to my settings file, but it doesn't seem to make a difference. Nothing shows up in the output log for the Remote-ssh extension. There are a lot of pty errors in the developer's console, but nothing else that looks like it could be making the install process hang. So, does anyone have any clues as to why the install process is hanging?

UPDATE 2: Setting remote.SSH.showLoginTerminal to false doesn't show the "install" terminal at all. But is this hiding the terminal and the issue, or is this actually solving the issue? It appears that the "Checking server status..." step was what was hanging in the process, but I could still use a bash terminal and open files. I can also still do all that with remote.SSH.showLoginTerminal set to false. I am using a ssh key and I am not using a password to login. I guess now I am more curious as to what is really going on here and making sure that there are no problems that are just being hidden by this setting.

The " Extensions want to make changes " part does not seem linked to microsoft/vscode-remote-release , but is more a VSCode warning , as shown in microsoft/vscode issue 108940 , still opened in issue 96699 .

Closing the install terminal does not terminate the session, but check settings, as seen in the " Troubleshooting hanging or failing connections ": something like " remote.SSH.showLoginTerminal " could have bearing on what you see.

The OP Charles Williams confirms having set "remote.SSH.showLoginTerminal" to false, which seems to resolve (or hide?) the issue.

I set remote.SSH.showLoginTerminal: false in the VS Code settings and it either hides these warnings or it gets rid of them. I am not sure. So, while I don't know why these warnings occurred, or if this setting really "fixed" it, I am going to say this is solved because nothing is blocking my use of the SSH Remote features of VS Code, and I am no longer getting annoying warnings.

I met the same problem as yours. At last, I found this problem happened because I used both MobaXterm and vscode to connect the remote host at the same time. When I closed MobaXterm ssh connection, the problem in vscode was solved.

Allowing the editor to install random undocumented code onto every remote server you access is very odd.

I've spent a fair amount of time going through the current (Aug 2022) VS Code 3rd-party extensions to find a less-invasive alternative, and the most straightforward seems to be "ftp-simple" which uses the common technique of using (s)ftp as the file-io method to the remote server allowing you to browse the file system, open file, edit, save pretty much as you would do on the local file system.

Some other VS Code 3rd-party (s)ftp extensions use the heavyweight 'synchronize workspace' model where your client copies the entire directory tree below your 'remote folder' assuming it's a 'project', and then keeps that local copy in sync with the server. This works ok for developers working on small projects (although frankly Git would be better) but doesn't fit the sysadmin ad-hoc file edits I might need to do. Another hiccup is some extensions allow you to edit a remote FILE, but don't integrate browsing the remote file system, so you have to specify the complete filename for the file you want to edit.

SFTP is a good fit for remote file editting because the editor file i/o is basically 'browse filesystem', 'read entire file', 'save entire file' which maps to sftp fine, and the clear delineation between the editting and the file read/write makes the remote access less vulnerable to connection issues.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM