How-to

Generate API Key manually

$ openssl rand -base64 32

Create encryption private/public keys

We will use openssl (that comes preinstalled with Ubuntu) to create the private & public key.

$ openssl version
OpenSSL 1.1.1f  31 Mar 2020
$
# Create an unencrypted private key 
$ openssl genrsa -out rsa_key.pem 2048

# Create a public key referencing the above private key
$ openssl rsa -in rsa_key.pem -pubout -out rsa_key.pub

Checking connectivity

$ ping -c 5 google.com
PING google.com (142.250.189.206) 56(84) bytes of data.
64 bytes from sfo03s25-in-f14.1e100.net (142.250.189.206): icmp_seq=1 ttl=116 time=10.7 ms
64 bytes from sfo03s25-in-f14.1e100.net (142.250.189.206): icmp_seq=2 ttl=116 time=9.46 ms
^C
--- google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3006ms
rtt min/avg/max/mdev = 9.460/10.152/10.848/0.631 ms

# alternative to test specific PORT
$ sudo apt install nmap
$ nmap --version
[...]
$ nmap -p 8443 a3qEXAMPLEsffp-ats.iot.eu-west-1.amazonaws.com
Starting Nmap 7.92 ( https://nmap.org ) at 2022-02-18 16:23 Pacific Standard Time
Nmap scan report for a3qEXAMPLEsffp-ats.iot.eu-west-1.amazonaws.com (xx.xxx.147.160)
Host is up (0.036s latency).
Other addresses for a3qEXAMPLEsffp-ats.iot.eu-west-1.amazonaws.com (not scanned): xx.xxx.134.144 xx.xxx.55.139 xx.xxx.110.235 xx.xxx.174.233 xx.xxx.74.65 xx.xxx.122.179 xx.xxx.127.126
rDNS record for xx.xxx.147.160: ec2-EXAMPLE-160.eu-west-1.compute.amazonaws.com

PORT     STATE SERVICE
8443/tcp open  https-alt
MAC Address: 00:11:22:33:44:55 (Cimsys)

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

Last updated