vscode-ssh免密链接

问题

每次使用ssh连接服务器的时候,会进行多次的密码的输入,这很烦人。

解决方法

在C盘根目录

C:\Users\用户名

运行命令

cd .ssh

运行命令,生成密钥对

ssh-keygen

查看公钥

type id_ed25519.pub

能看到一长串以这个开头的内容:

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5...

上传公钥

type "%USERPROFILE%.ssh\id_ed25519.pub" | ssh root@IP "umask 077; mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys"

后续还需要输入一次密码,后面就不需要密码输入了

相关推荐
软泡芙4 小时前
【IOS】Codable
ios·ssh·cocoa
枝枝在Coding6 小时前
跳板机明明能连上,为什么内网服务器还是进不去?
ssh
qq_349447951 天前
Linux系统,安装git,从使用git下载仓库(GitHub, Gitee, GitLab 等),并且使用ssh密钥,可以直接执行git pull
linux·git·ssh
刘梦薇2 天前
SSH连接失败connection reset解决办法
linux·运维·ubuntu·ssh·腾讯云
三言老师3 天前
秘诀-如何远程SSN访问家里的八台电脑(frp 实操方案)
linux·运维·ssh
柒号华仔3 天前
「速通Shell」聚砖成墙,Shell函数封装之道
linux·ssh·bash
整点bug3 天前
AI 运维该不该自动执行命令?
运维·ssh·openai
进击的码力3 天前
win11 使用ssh 遇到权限too open 无法登录服务器的问题
运维·服务器·ssh
zhengqiqiqinqin4 天前
Ubuntu16.04 升级ssl到3.5.7、升级ssh到9.8p1
网络协议·ssh·ssl
像风一样自由20205 天前
加强版VScode结合remote-ssh远程连接服务器开发指南
服务器·vscode·ssh