当前位置:网站首页>The error log of vscode connecting to the server shows the problem of "insufficient permission". Directly use root to connect

The error log of vscode connecting to the server shows the problem of "insufficient permission". Directly use root to connect

2022-06-25 20:03:00 The ninth tree

Use vscode There are many ways to connect to the server , You can reconnect it twice , Give me a mask .

step
First step : Create in the user directory of this computer .ssh Folder , Enter the folder and press shift+ Right mouse button , Get into powershell Command window , Enter the command ssh-keygen Enter to pass rsa The encryption algorithm generates a pair of keys , A public key and a private key , If you don't know about asymmetric encryption, you can baidu by yourself .

The second step : Public key ( The suffix has a pub) Send to server , Type... On the server cd ~/.ssh/ Get into .ssh After the directory , Input vim authorized_keys, Copy all the public key contents just generated by the machine to this file , Save and exit .

The third step : Get into vscode in ,.shh In the configuration file of usr fill root.

This should be the server's root User password free login , If the linux I'm not very familiar with it. I suggest not to do so , It is easy to confuse the laboratory server , I'm familiar linux Do it again .

For non root user ,vscode Connection or error , Maybe you can try root In the catalog .vscode-server Forced deletion of files , namely rm -rf .vscode-server, Some people say that such a connection will be automatically generated .vscode-server, It's very metaphysical .

原网站

版权声明
本文为[The ninth tree]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202190509181764.html