1. window生成ssh key
ssh-keygen -t rsa -f remote-ssh_rsa -C "vs code remote-ssh key"
生成remote-ssh_rsa, remote-ssh_rsa.pub
2.linux server 存放ssh pub key
authorized_keys
是默认存在public keys的文件。
scp remote-ssh_rsa.pub root@serverip:~/.ssh/authorized_keys
3.windows test key
ssh root@serverip -i remote-ssh_rsa
4.vs code: Remote-SSH setting
Host yourremotehost
User yourname
HostName yourserverIP
IdentityFile C:\Users\.ssh\remote-ssh_rsa