title: OpenSSL: Fetching SQL Server public certificate
body: <p>I want to use OpenSSL or any native Linux command to grab the certificate of a SQL Server. I tried the same way as I do with an HTTP server but it doesn't work.</p>
  
  <pre><code>openssl s_client -showcerts -connect MY.MSSQL.SERVER:1433
  CONNECTED(00000003)
  write:errno=104
  ---
  no peer certificate available
  ---
  No client certificate CA names sent
  ---
  SSL handshake has read 0 bytes and written 249 bytes
  ---
  New, (NONE), Cipher is (NONE)
  Secure Renegotiation IS NOT supported
  Compression: NONE
  Expansion: NONE
  ---
  </code></pre>