84 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: VsCode
date: 2025-04-16 15:18:28
tags:
---
# 插件
## Remote - SSH
### 配置远程连接Linux密码免登录
编辑配置文件,一般位于`~/.ssh/config`
```shell
# Read more about SSH config files: https://linux.die.net/man/5/ssh_config
Host <host>
HostName <host_name>
Port 22
User <user>
IdentityFile C:/Users/user/.ssh/id_rsa
PreferredAuthentications publickey
```
在要连接的远程服务器上保存公钥,使用要进行连接的用户进行登录
```shell
vim ~/.ssh/authorized_keys
```
将秘钥对应的公钥复制上去
![image-20250416155023228](http://minio.wenyongdalucky.club:9000/hexo/image-20250416155023228.png)
保存即可
编辑 **sshd_config**
```shell
vim /etc/ssh/sshd_config
# 使用 /PubkeyAuthentication 查找
# 编辑取消注释并将no 改为yes
PubkeyAuthentication yes
# :wq 保存
# 重启sshd服务
systemctl restart sshd
```
Windows `~/.ssh` 目录属性中 安全 -> 高级
![image-20250416155557565](http://minio.wenyongdalucky.club:9000/hexo/image-20250416155557565.png)
需 停用继承,我这里已经停用
![image-20250416155636248](http://minio.wenyongdalucky.club:9000/hexo/image-20250416155636248.png)
然后点击 添加,选择主体
![image-20250416155715122](http://minio.wenyongdalucky.club:9000/hexo/image-20250416155715122.png)
选择高级
![image-20250416155749520](http://minio.wenyongdalucky.club:9000/hexo/image-20250416155749520.png)
点击 立即查找
![image-20250416155823198](http://minio.wenyongdalucky.club:9000/hexo/image-20250416155823198.png)
选择 Administrator 和 SYSTEM
![image-20250416155859285](http://minio.wenyongdalucky.club:9000/hexo/image-20250416155859285.png)
![image-20250416155914072](http://minio.wenyongdalucky.club:9000/hexo/image-20250416155914072.png)
点击两次 确定后,将 基本权限改为 完全控制
![image-20250416155949694](http://minio.wenyongdalucky.club:9000/hexo/image-20250416155949694.png)
再次点击确定
重复上述步骤,将 当前系统登录用户 添加,不需要勾选完全控制 即可