记录

[【vscode】设置免密码连接远程服务器_vscode免密登陆远程服务器-CSDN博客](https://blog.csdn.net/qq_45956730/article/details/137601010)
cmd

```cmd
ssh-keygen
找到C:\Users\【用户名】\.ssh\rsa.pub复制
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDH3v5zXryO48qGi929uRz/bx3g/v4d2mPct9MQog8C6n9MbpyCxxCwLVf02YwyR0si9uqnODg76sA7bbj0DpSfgszA2S3XnDzY2iOssH+s3TszSNXLNiA3CJ37pZHN0JpU4mtcf3b7I7fZuiQHzq/7rOa/rKmwnconGsQbUg4NMJChKWNK0sg1JKj7Q2xXy0QlStQPWsCMyiFr/GYz/Bm7nt4lJbPy6NqGH767VWagaPgYHQNEmEpfs9yLrv5YGlbfH/8jK5vM/i4KgCa8P4wYcTi6OGnF6jRfl9T790uzgAQpHnmOsifvdJbpuusYS4rMTGGgNsL+AFcwFpWK2/4hWaHPifM+93FVd/g+IsQHtvedK5ArwRFuRfuVtcGxkWdmTH3OfxXQM6SdCa6d45JIkx4WYBRcYXkI2U8bfP7Tc+xPsWjkPX3d3tmBM0hEjheHO19Eb1az+QnEt2rHaFughNkgyoMEP9uVaWFdBN9GTCEPbcsFn9q4Mi6B8goF2Nk= 32892@cyy

// 远程
mkdir -p ~/.ssh
chmod 700 ~/.ssh
touch ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
把密钥粘贴到这里面

```

^3e4f15

ubuntu上没有.ssh文件？
进入root文件夹下新建一个

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJWiUKIFak5T/HSx9RX6ARJFJOsU3DqwNwSXgUnXsSyC mac ssh key
