1. Linux端
1、安装ssh服务就不用说了,其二,开启RSA验证(最好)
vim /etc/ssh/ssh_config
## 将 RSAAuthentication 前面的# 去掉,以及 IdentityFile 前面的#去掉
2、并将你本地RSA公钥发送到服务器的.ssh/authorized_keys
文件
2. VS Code配置
安装相关插件不用说了(Remote SSH)
Host Server
HostName [ip_adress_of_remote_server]
User [username]
Port [port]
IdentityFile [local_ssh_file_path]\.ssh\id_rsa
#中括号内为根据自己的配置实际填写的内容,不需要中括号
主要是这里的配置