Ao usar este site, você concorda com o política de Privacidade.
Aceitar
Entrar em TIEntrar em TIEntrar em TI
  • LAR
  • PROFISSIONAL DE TI
  • TECNOLOGIA
  • Microsoft
    • Azul
    • Configmgr/sccm
    • PMD
    • Orquestrador
    • Hiper-V
    • Microsoft Edge Insider
    • Msi
    • Escritório 365
    • Insider Office
    • Power bi
    • Skype
    • Servidor SQL
    • Equipes
  • WINDOWS
    • Centro de Administração do Windows
    • Cliente Windows
    • Servidor Windows
  • Lista de coleta de consultas SCCM
Leitura: Securing Your Linux Server: How to Check TLS/SSL Certificate Expiration Dates
Redimensionador de fontesAh
Entrar em TIEntrar em TI
Redimensionador de fontesAh
  • LAR
  • PROFISSIONAL DE TI
  • TECNOLOGIA
  • Microsoft
  • WINDOWS
  • Lista de coleta de consultas SCCM
Procurar
  • LAR
  • PROFISSIONAL DE TI
  • TECNOLOGIA
  • Microsoft
    • Azul
    • Configmgr/sccm
    • PMD
    • Orquestrador
    • Hiper-V
    • Microsoft Edge Insider
    • Msi
    • Escritório 365
    • Insider Office
    • Power bi
    • Skype
    • Servidor SQL
    • Equipes
  • WINDOWS
    • Centro de Administração do Windows
    • Cliente Windows
    • Servidor Windows
  • Lista de coleta de consultas SCCM
Linux

Securing Your Linux Server: How to Check TLS/SSL Certificate Expiration Dates

Publicado: Fevereiro 18, 2024
3 Leitura mínima
COMPARTILHAR

Securing Your Linux Server: How to Check TLS/SSL Certificate Expiration Dates. Neste artigo, we will learn how to check the expiration date of an SSL/TLS certificate from the command line using the OpenSSL client. The OpenSSL client provides detailed information about the validity dates, expiry dates, and issuing authority of the certificate.

To check the expiration date of an SSL/TLS certificate, open the Terminal application and run the following command:

openssl s_client -servername {SERVER_NAME} -connect {SERVER_NAME}:{PORT} | openssl x509 -noout -dates

Por exemplo, to find out the expiration date of the certificate for Enterinit.com, run the following command:

DOM="enterinit.com"
PORT="443"
openssl s_client -servername $DOM -connect $DOM:$PORT | openssl x509 -noout -dates

The output will include information about the certificate’s start and expiry dates.

You can add the echo command to avoid having to press CTRL+C, as shown below:

DOM="{SITE_URL}"
PORT="443"
echo | openssl s_client -servername $DOM -connect $DOM:$PORT | openssl x509 -noout -dates

O openssl command-line options used in the above commands are as follows:

  • s_client: Implements a generic SSL/TLS client that connects to a remote host using SSL/TLS.
  • -servername $DOM: Sets the TLS SNI (Server Name Indication) extension in the ClientHello message to the given value.
  • -connect $DOM:$PORT: Specifies the host ($DOM) and optional port ($PORT) to connect to.
  • x509: Runs certificate display and signing utility.
  • -noout: Prevents output of the encoded version of the certificate.
  • -dates: Prints out the start and expiry dates of a TLS or SSL certificate.

To find out the expiration date of a PEM encoded certificate file, run the following command:

openssl x509 -enddate -noout -in {/path/to/my/my.pem}

Por exemplo, to find out the expiration date of the certificate for Enterinit.com, run the following command:

openssl x509 -enddate -noout -in /etc/nginx/ssl/enterinit.com

The output will include the certificate’s expiry date.

You can also check if the certificate will expire within a given timeframe. Por exemplo, to find out if the certificate will expire within the next seven days, run the following command:

openssl x509 -enddate -noout -in my.pem -checkend 604800

To check if the certificate will expire in the next four months, run the following command:

openssl x509 -enddate -noout -in my.pem -checkend 10520000

In summary, OpenSSL is a powerful diagnostic tool that provides useful information about the SSL/TLS certificates. It helps you to ensure that the certificates are valid and up-to-date, and to take timely action when necessary.

MARCADO:AlmaruxBashCENTOSLinuxUbuntu
Artigo Anterior Marking Azure DevOps Builds as Failed Using Command Line
Próximo artigo Bash inicia a versão do Azure DevOps via API
Deixe um comentário Deixe um comentário

Deixe uma resposta Cancelar resposta

Seu endereço de e-mail não será publicado. Os campos obrigatórios estão marcados *

Este site usa Akismet para reduzir spam. Saiba como os dados dos seus comentários são processados.

Tradução

English中文(简体)DanskNederlandsFrançaisDeutschItaliano한국어PolskiPortuguêsRomânăEspañolУкраїнська
por Transposh - translation plugin for wordpress

Postagens populares

Requisitos do sistema para Windows Server 2016
Servidor Windows
Lista de coleta de consultas do Configuration Manager
Lista de coleta de consultas do Configuration Manager
Configmgr
Navegação estruturada/gerenciada habilitada em páginas modernas em sites de equipe clássicos
Tecnologia
SCCM Falha ao obter locais de DP como a versão esperada do MP
Configmgr

Postagens recentes

Instalando e configurando Fail2ban para proteção SSH no Ubuntu 24.04
Linux
Habilitando e configurando FirewallD no AlmaLinux
Linux
Criação de usuário e configuração de chave SSH no AlmaLinux
Linux
Como redefinir a senha no AlmaLinux
Linux

© 2023 Entrar em TI

Vá para a versão móvel
Bem vindo de volta!

Faça login na sua conta

Nome de usuário ou endereço de e-mail
Senha

Perdeu sua senha?