微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何修复SQL Server的Microsoft ODBC驱动程序17:SSL提供程序ssl_choose_client_version:不支持的协议

如何解决如何修复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

并将它们添加到我的文件中:

    ess_cert_id_alg = sha1标题下的
  • [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

我知道MinProtocolCipherString通常设置为TLSv1.2DEFAULT@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 举报,一经查实,本站将立刻删除。