Solution to the error problem of Vscode remotely connecting to Ubuntu

Solution to the error problem of Vscode remotely connecting to Ubuntu

1. Background of the incident:

Because of work needs to use vscode remote connection to Ubuntu. (The specific connection method can be found on Baidu, this article is limited to sharing the problems encountered)

2. Problem phenomenon:

A problem occurred during this process. Its text description is: Could not establish connection to "IP address" and the process attempted to write to a pipe that does not exist.

As shown in the following figure:

3. Problem Analysis:

1. Search for the cause online based on the error reported.

There are too many and too broad matches for the keyword "The pipe that the process attempted to write to does not exist", such as due to installing Git, due to upgrading the Ubuntu system, and due to not installing the open ssh software. Apart from being dazzled, I gained nothing. So change your thinking.

2. Identify the problem, is it a problem with the connection party (vscode, Windows) or Ubuntu?

To verify the direction, I used the secureCRT software to successfully connect to Ubuntu remotely. This proves that all aspects of the Ubuntu system are configured OK.

3. Further narrow down the scope, vscode software or window configuration issues

To further narrow the scope, I used cmd to successfully connect to Ubuntu (the specific operation method can be found on Baidu, there are many tutorials, which will not be repeated here). Then it is probably a problem with vscode itself.

Note, because I was worried that there was an error in installing the open ssh software. It is worth mentioning that if openssh cannot be installed, you can install the Git software, which will help the system install openssh. (Windows 10 comes with openssh, so you don’t need to worry about this issue)

4. Identify specific issues

At this point, the scope of the problem is very small. After reading the posts of the experts, I finally located it as a file permission problem of ssh.

I pasted the great god’s post, as shown below:

In layman's terms: the remote-ssh plugin in vscode will change the permissions of the .ssh/config file.

So, I immediately modified the permissions of .ssh so that it can be accessed normally by vscode.

4. Problem Solving

1. Modify the permissions of .ssh

(The modification method is on Baidu, please forgive me for being too lazy to write it)

After a lot of trouble, I tried it out with great joy, but it still didn't connect. It was the same formula and the same problem.

There must be some other problem.

Then just keep looking. . . . . Here, I would like to express my special thanks to the Internet masters who are willing to share their experiences, allowing a rookie like me to stand on the shoulders of giants and "copy".

It turns out that you also need to add the config path in the remote-ssh plug-in, otherwise the former cannot be recognized. Um. . . That’s right, if you don’t tell it the address, it won’t be able to find it.

2. Add config path

To avoid verbose text, please see the following picture

Finally, you all understand. The problem was successfully solved. This is the happiest thing today. Hahahaha.

V. Acknowledgements

Thanks to the big guys who shared selflessly on the Internet.

Summarize

This is the end of this article about the error problem of Vscode remote connection to Ubuntu. For more related content about the error problem of Vscode remote connection to Ubuntu, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • VSCode remotely connects to other hosts' WSL2
  • How to connect to and configure vscode remotely via Remote SSH
  • VSCode remote connection server error: Could not establish connection to

<<:  vue+element-ui implements the head navigation bar component

>>:  MySQL backup table operation based on Java

Recommend

The HTML 5 draft did not become a formal standard

<br />Yesterday I saw at W3C that the new HT...

Configure selenium environment based on linux and implement operation

1. Using Selenium in Linux 1. Install Chrome Inst...

Vue component library ElementUI realizes the paging effect of table list

ElementUI implements the table list paging effect...

A brief discussion on the implementation of fuzzy query using wildcards in MySQL

In the MySQL database, when we need fuzzy query, ...

Introduction to the usage of common XHTML tags

There are many tags in XHTML, but only a few are ...

5 Ways to Send Emails in Linux Command Line (Recommended)

When you need to create an email in a shell scrip...

Ant designing vue table to achieve a complete example of scalable columns

Perfect solution to the scalable column problem o...

Tutorial on customizing rpm packages and building yum repositories for Centos

1 Keep the rpm package downloaded when yum instal...

Solution to the IP address not being displayed under Linux

Table of contents Preface Solution: Step 1 Step 2...

Common usage of hook in react

Table of contents 1. What is a hook? 2. Why does ...

MySQL database monitoring software lepus usage problems and solutions

When using lepus3.7 to monitor the MySQL database...