Linux配置

149 字
1 分钟
Linux配置

开发环境#

Docker#

远程连接#

vscode连接服务器#

首先登录虚拟机,在虚拟机中安装服务openssh-server:

Terminal window
sudo apt install openssh-server

查看本机的 IP 地址ifconfig。

回到家目录,观察有没有.ssh文件夹,没有直接mkdir .ssh新建一个就行了。

在.ssh文件夹中touch authorized_keys 新建一个authorized_keys文件,这个文件用来保存之后的ssh公钥。

如果Windows没有公私钥,打开powershell 使用ssh-keygen生成密钥

复制Windows下的id_rsa.pub 密钥(一般在user/xxx/.ssh目录下),粘贴到authorized_keys

使用vscode Remote - SSH插件连接即可

Linux配置
https://www.xwysyy.cn/posts/linux-config/
作者
xwysyy
发布于
2024-12-27
许可协议
CC BY-NC-SA 4.0

文章目录