如題 更新最新152/153出事了,
SFTP 上傳或下載服務器文件直接報錯(以前一直都可以突然就跪了),擴展宿主意外終止,GIT配置什么都試過,沒用,查了所有方法基本都沒用,最后在issue里面找到方法。
在.VSCODE/SFTP.JSON (←配置文件)里加入以下內容:
"algorithms": { "kex": [ "ecdh-sha2-nistp256", "ecdh-sha2-nistp384", "ecdh-sha2-nistp521", "diffie-hellman-group14-sha1" ], "cipher": [ "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" ] }
保存即可,不再報錯,正常使用了。
原因大概是默認算法還包括了一個sha256但這個服務器一般沒開導致不匹配,目的是去掉默認的diffie-hellman-xxxxxxx-sha256。於是就不報錯了。