vs code 插件 sftp 错误 Handshake failed: no matching client->server cipher 问题解决
一、引言在 linux 的开发过程中,难免需要对服务器上的项目进行修改。能够 sftp 上服务器并且可以方便编辑文件的,可能还真是 UltraEdit 做的最好。可是我喜欢 vs code。正好 vs code 也有一个 sftp 插件。可是,今天在使用 vs code 连接到服务器上的时候,出了这么一个错误:Handshake failed: no matching cl...
·
一、引言
在 linux 的开发过程中,难免需要对服务器上的项目进行修改。能够 sftp 上服务器并且可以方便编辑文件的,可能还真是 UltraEdit 做的最好。
可是我喜欢 vs code。
正好 vs code 也有一个 sftp 插件。
可是,今天在使用 vs code 连接到服务器上的时候,出了这么一个错误:
Handshake failed: no matching client->server cipher
问题出现的含义非常清晰,就是客户端与服务端没有一个统一的加密算法。
二、解决
解决这个问题的方法很简单,在 sftp.json 中增加如下配置信息:
"algorithms": {
"kex": [
"diffie-hellman-group1-sha1",
"ecdh-sha2-nistp256",
"ecdh-sha2-nistp384",
"ecdh-sha2-nistp521",
"diffie-hellman-group-exchange-sha256",
"diffie-hellman-group14-sha1"
],
"cipher": [
"3des-cbc",
"aes128-ctr",
"aes192-ctr",
"aes256-ctr",
"aes128-gcm",
"aes128-gcm@openssh.com",
"aes256-gcm",
"aes256-gcm@openssh.com"
],
"serverHostKey": [
"ssh-rsa",
"ecdsa-sha2-nistp256",
"ecdsa-sha2-nistp384",
"ecdsa-sha2-nistp521"
],
"hmac": [
"hmac-sha2-256",
"hmac-sha2-512",
"hmac-sha1"
]
}
通过增加了这段配置信息,我成功 sftp 到了服务器,希望能够对你有一些帮助 ^_^
Enjoy It :)
更多推荐
已为社区贡献1条内容
所有评论(0)