如何解决如何修复SQL Server的Microsoft ODBC驱动程序17:SSL提供程序ssl_choose_client_version:不支持的协议
我已在最小的Ubuntu 20.04上安装了sql Server 2019 Developer Edition和mssql-tools。 我可以毫无问题地连接到本地主机,但是当我想远程连接到另一个sql Server时:
sqlcmd -S <server> -U <username> -P <password>
我遇到此错误:
sqlcmd: Error: Microsoft ODBC Driver 17 for sql Server : SSL Provider: [error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol].
sqlcmd: Error: Microsoft ODBC Driver 17 for sql Server : Client unable to establish connection.
我在Debian 10中曾经遇到过这个问题,并且还在网上寻找解决方案,所以之后我手动更改了openssl.conf
(需要su权限):
nano /etc/ssl/openssl.cnf
-
在
-
[tsa_config1]
-
openssl_conf = default_conf
靠近顶部 -
最后的内容:
[default_conf]
ssl_conf = ssl_sect
[ssl_sect]
system_default = system_default_sect
[system_default_sect]
MinProtocol = TLSv1.0
CipherString = DEFAULT @ SECLEVEL = 1
ess_cert_id_alg = sha1
标题下的我知道MinProtocol
和CipherString
通常设置为TLSv1.2
和DEFAULT@SECLEVEL=2
,但是正如我在Debian 10中提到的那样,我编辑了openssl.conf和将TLSv1.2
更改为TLSv1.0
,将DEFAULT@SECLEVEL=2
更改为DEFAULT@SECLEVEL=1
,并修复了我的连接,但是在Ubuntu 20.04中,这不仅没有这些行,而且当我手动插入这些行时我再次遇到相同的错误:
sqlcmd: Error: Microsoft ODBC Driver 17 for sql Server : SSL Provider: [error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol].
sqlcmd: Error: Microsoft ODBC Driver 17 for sql Server : Client unable to establish connection.
我的opnessl版本是:
OpenSSL 1.1.1f 31 Mar 2020
我还将我的openssl一次降级到1.0,但它也不起作用!
我什么都找不到,所以我来这里寻求帮助,感谢您的帮助。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。