Open TreasureJim opened 2 years ago
I faced this same issue. I beleive this is caused by OpenSSL 3.0
having CipherString = DEFAULT:@SECLEVEL=2
in /etc/ssl/openssl.cnf
What solved it for me is to create an alternate config /etc/ssl/openssl_tls1.cnf
:
openssl_conf = default_conf
[ default_conf ]
ssl_conf = ssl_sect
[ssl_sect]
system_default = system_default_sect
[system_default_sect]
MinProtocol = TLSv1
CipherString = DEFAULT:@SECLEVEL=1
And then when I make the connection:
OPENSSL_CONF=/etc/ssl/openssl_tls1.cnf mssql-cli -S <server> -U <user> -P <password> -d <database>
Works on Ubuntu 22.04.1 LTS
, OpenSSL 3.0.2
connecting to Microsoft SQL Server 2014 (SP2) (KB3171021) - 12.0.5000.0 (X64)
Tip
I found it helpful to first troubleshoot getting sqlcmd
to work to rule out other connection problem. I was connecting from WSL2
and there were definitely other issues to overcome with that setup.
https://stackoverflow.com/a/72137153/19946316 Maybe this helps?
System Information Connecting OS: Ubuntu 20.04 Server OS: Microsoft Windows Server 2012 SQL Server: Microsoft SQL Server 2014
Problem Can't connect to my SQL Server after installing
mssql-cli
throughpip
. There doesn't seem to be an apt repository for Ubuntu 20.04 so couldn't install via that method like adviced in documentation. Runningmssql-cli -S 192.168.100.201 -U <user> -P <user>
gives an error of:Error message: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)
. Running it with--enable-sqltoolsservice-logging
gives an output of: