Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I'm setting up a new remote host and every time I initiate it I get the following error output. How can I resolve this issue?
Pseudo-terminal will not be allocated because stdin is not a terminal.
Linux Destiny 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1 (2019-04-12) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
mesg: ttyname failed: Inappropriate ioctl for device
bash: cannot set terminal process group (3202): Inappropriate ioctl for device
bash: no job control in this shell
mesg: ttyname failed: Inappropriate ioctl for device
Installing...
Downloading with wget
WARNING: tar exited with non-0 exit code
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
)
cat: /root/.vscode-remote/.473af338e1bd9ad4d9853933da1cd9d5d9e07dc9.log: No such
file or directory
Server did not start successfully. Full server log:
cat: /root/.vscode-remote/.X.log51ec4692-
4da4-4ec0-b613-5a3563034cf1====
: No such file or directory
"install" terminal command done
Received install output: : No such file or directory
Failed to parse remote port from server output: : No such file or directory
If the server fails to shut down properly, sometimes it leaves dangling lockfiles. This can cause startup to fail and produce the "Failed to parse remote port from server output" error message. In this case the solution is to simply to delete the lockfiles:
.vscode-server/bin/[:xdigit:]*/vscode-remote-lock.*
–
I also got the same issue and my workaround was to provide proper rights to the home
or user
folder, so Visual Studio Code can create a remote folder and do the required installation on it.
Example:
sudo chmod -R 777 home/
In this case, I have provided all rights to my home folder (777) and it worked like a charm for all the users.
–
On the remote machine you do not have a tar file installed. It's in the log output
Installing... Downloading with wget
WARNING: tar exited with non-0 exit code
so under a root run:
apt-get install tar
or with sudo, if you have a user with sudoers configured:
sudo apt-get install tar
–
I ssh'd onto the remote server (Linux) and then deleted both directories as follows:
rm -r .vscode-server.backup2022-04-03T16:20:18-05:00
rm -r .vscode-server
I had the same issue because Visual Studio Code was looking for my .vscode-server directory in the wrong location (it was in a custom location due to restrictions on where files can be saved). This can be fixed by using How to change vscode-server directory. Specifically, add
"remote.SSH.lockfilesInTmp": true,
"remote.SSH.serverInstallPath":{
"hostname":"/path/to/.vscode-server/.."
to your settings.json file.
In my case, it wasn't working because of the server asking for a new password when starting a session. I opened a new default terminal (not the Visual Studio Code terminal, but your OS default terminal, like Z shell, CMD, and so on). And I used the ssh
command to log in. I logged in successfully and changed the password. Then I tried connecting with the new password and it worked, because the server didn't asked for a password change now.
Command:
ssh username@IP
Enter the password and you'll get asked to change the password. Change the password and try connecting again with new password using the SSH Visual Studio Code extension.
Sachin's answer directed me in the right direction. Visual Studio Code needs permissions in order to create some files, but instead of giving 777 permissions to your home folder (which can be dangerous), you can just chown the user that wants to log in (the user for me was ubuntu):
sudo chown -R ubuntu /home
I also got the same issue and my workaround was to provide proper rights to the home or user folder, so Visual Studio Code can create a remote folder and do the required installation on it.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.