Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

60%
+1 −0
Q&A Command to display remote certificate information

nmap can do this: $ nmap -p 443 --script ssl-cert codidact.com Starting Nmap 7.95 ( https://nmap.org ) at 2024-08-12 10:06 EEST Nmap scan report for codidact.com (104.26.0.18) Host is up (0.00...

posted 3mo ago by Iizuki‭

Answer
#1: Initial revision by user avatar Iizuki‭ · 2024-08-12T07:16:32Z (3 months ago)
[`nmap`](https://nmap.org/) can do this:

```commandline
$ nmap -p 443 --script ssl-cert codidact.com 
Starting Nmap 7.95 ( https://nmap.org ) at 2024-08-12 10:06 EEST
Nmap scan report for codidact.com (104.26.0.18)
Host is up (0.0037s latency).
Other addresses for codidact.com (not scanned): 172.67.69.183 104.26.1.18 2606:4700:20::ac43:45b7 2606:4700:20::681a:112 2606:4700:20::681a:12

PORT    STATE SERVICE
443/tcp open  https
| ssl-cert: Subject: commonName=codidact.com
| Subject Alternative Name: DNS:codidact.com, DNS:*.codidact.com
| Issuer: commonName=WE1/organizationName=Google Trust Services/countryName=US
| Public Key type: ec
| Public Key bits: 256
| Signature Algorithm: ecdsa-with-SHA256
| Not valid before: 2024-07-19T22:57:44
| Not valid after:  2024-10-17T22:57:43
| MD5:   21a2:8844:43a9:2f68:6bbc:a49e:f3c0:d9a6
|_SHA-1: b42f:d65f:cd2d:5281:9d40:52bf:6578:6c74:95df:7c1a

Nmap done: 1 IP address (1 host up) scanned in 0.12 seconds
```

It uses the [`ssl-cert`](https://nmap.org/nsedoc/scripts/ssl-cert.html) [nmap script](https://nmap.org/book/man-nse.html) to gather and print out the information. `-p 443` just [selects the port to scan](https://nmap.org/book/man-port-specification.html), and `443` happens to be the usual `HTTPS` port.