gpt4 book ai didi

C# 在使用 SSH Ftp 时出现 "DER length is ' 9 5' and cannot be more than 4 bytes"错误

转载 作者:行者123 更新时间:2023-12-02 14:23:22 26 4
gpt4 key购买 nike

代码:

var connectionInfo = new ConnectionInfo(Utilities.GetConfigValueByKey(processName + Constants.KEY_FTP_SERVER), Convert.ToInt32(Utilities.GetConfigValueByKey(processName + Constants.KEY_FTP_PORT)),
Utilities.GetConfigValueByKey(processName + Constants.KEY_FTP_USERID),
new PasswordAuthenticationMethod(Utilities.GetConfigValueByKey(processName + Constants.KEY_FTP_USERID)
, Utilities.GetConfigValueByKey(processName + Constants.KEY_FTP_PWD)),
new PrivateKeyAuthenticationMethod(Utilities.GetConfigValueByKey(processName + Constants.KEY_FTP_USERID),
new PrivateKeyFile(File.OpenRead(@"C:\Jobs\Test\id_rsa"), "testpwd"))
);

它在 privateKeyfile 处失败,有人可以帮助我我做错了什么吗。

我已经尝试将文件名作为文本文件,但还是不行。

最佳答案

对于历史以及是否可以帮助某人。对我来说,问题在于密码。有一个额外的字符(回车),它会阻止 key 访问并显示此错误

关于C# 在使用 SSH Ftp 时出现 "DER length is ' 9 5' and cannot be more than 4 bytes"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19846843/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com