User Tools

Site Tools


ssl:mengecek-ssl-dengan-openssl-via-command-line

Mengecek Status Expired SSL via Command Line Linux

Berikut ini adalah command line openssl untuk mengecek status ssl, tanggal expired dari ssl via command line linux.

Test FTP

openssl s_client -connect server.yourdomain.com:21 -starttls ftp

Test POP3

openssl s_client -connect server.yourdomain.com:995

Test IMAP

openssl s_client -connect server.yourdomain.com:993

Test SMTP SSL

openssl s_client -connect server.yourdomain.com:465

Test SMTP TLS

openssl s_client -connect server.yourdomain.com:587 -starttls smtp

Test HTTPS

openssl s_client -connect server.yourdomain.com:443

Test DirectAdmin

openssl s_client -connect server.yourdomain.com:2222

Percobaan

Percobaaan dari perintah test ssl diatas

[root@cluster-smtp-1 ~]# openssl s_client -connect smtp.mailku.net:465
CONNECTED(00000003)
depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify return:1
depth=0 CN = smtp.mailku.net
verify return:1
---
Certificate chain
 0 s:/CN=smtp.mailku.net
   i:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
 1 s:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
   i:/O=Digital Signature Trust Co./CN=DST Root CA X3
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIFWDCCBECgAwIBAgISA/Byvq9BMA3XIkZHMELzGpzKMA0GCSqGSIb3DQEBCwUA
MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD
ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0yMDAxMDgwNDQwMTlaFw0y

-----END CERTIFICATE-----
subject=/CN=smtp.mailku.net
issuer=/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
---
No client certificate CA names sent
Server Temp Key: ECDH, prime256v1, 256 bits
---
SSL handshake has read 3061 bytes and written 373 bytes
---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-RSA-AES256-GCM-SHA384
    Session-ID: 7A8D1AB714785A56800F894D632D77378E8799066CA64BCBF0D4CCC451E1C8A3
    Session-ID-ctx:
    Master-Key: 5F44E3256A182FB0BEF326A795A3022A6662485739222988CB75EAA7353130FAF60767CF6754EF1D26C7BE1698C0A145
    Key-Arg   : None
    Krb5 Principal: None
    PSK identity: None
    PSK identity hint: None
    Start Time: 1578465882
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)
---
220 cluster-smtp-1.mailku.net ESMTP Exim 4.92.2 Wed, 08 Jan 2020 13:44:42 +0700

Percobaan lagi melihat tanggal expired

openssl s_client -connect smtp.mailku.net:465 2>/dev/null | openssl x509 -noout -dates
notBefore=Jan  8 04:40:19 2020 GMT
notAfter=Apr  7 04:40:19 2020 GMT

Percobaan lagi

echo | openssl s_client -connect smtp.mailku.net:465 2>/dev/null | openssl x509 -noout -dates
notBefore=Jan  8 04:40:19 2020 GMT
notAfter=Apr  7 04:40:19 2020 GMT

Opsi

echo | openssl s_client -connect smtp.mailku.net:465 2>/dev/null | openssl x509 -noout -issuer -subject -dates

dan lainya

Layanan

Harga Domain .COM | Harga Domain .ID | Shared Hosting | Email Hosting | MySQL Hosting |
ssl/mengecek-ssl-dengan-openssl-via-command-line.txt · Last modified: 2020/01/08 13:47 by kbadmin