How To Fix SSH Permission Denied From macOS Ventura To Amazon Linux

Author: , May 9th, 2023

I have been using RSA SSH keys forever to login to my various AWS EC2 instances. With macOS Ventura 13.3.1 ssh failed with the “Permission Denied” error. Using ssh -vvv, I saw that the RSA key was now being rejected. After much research, I decided to implement new keys on the client (Ventura) side using […]

How To Expand an EBS Volume After a Disk Resize on Amazon Linux

Author: , April 17th, 2023

First, use the AWS Console to modify the volume to the desired size, in our example we want to go from 10GB to 25GB for the root filesystem For a Xen ext4 root volume

For NVMe First, use lsblk to see the raw partitions:

Note how the partition at 259:1 is only 20GB, […]

How To Copy Key Pairs To Another AWS Region Using The ssh-keygen Command

Author: , August 4th, 2021

I wanted to use the same SSH keys for multiple AWS regions. As it turns out, AWS simply stores the public key when you download the private key as a .pem file. The solution is to simply generate the public key locally from the existing .pem, then import the public key using the same name […]

How To Fix Email Service Unavailable Delivery Issues with IPv6 on Amazon Linux

Author: , July 16th, 2021

PROBLEM: Email delivery to Google was failing with a “Service Unavailable” error:

Note that the network address for the destination is shown as IPv6! That is the root cause of the issue: 1. Sendmail is sending mail from the IPv6 address instead of the IPv4 address 2. Google rejects IPv6 senders without proper reverse […]

How To Search the APT Sources for Available Packages

Author: , June 10th, 2021

Search for a string:

List all packages:

How To Convert from AWS Instance Family t2 to t3 with Enhanced Networking on Amazon Linux 1

Author: , June 10th, 2021

I wanted to change instance type from t2 to t3, but got an error when i went to start the instance:

I found this AWS docs page: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking-ena.html Below are the steps I need to follow on AWS Linux 1. Summary Steps Pre-flight tests on t2 modinfo ena -> see “ERROR: modinfo: could not […]

How To Expand an NVMe EBS Volumes After a Disk Resize on Amazon Linux

Author: , February 19th, 2021

First, use lsblk to see the raw partitions:

Note how the partition at 259:1 is only 20GB, while the entire disk at 259:0 is 40GB. A partition resize is required in this case.

For an EXT4 filesystem, use the resize2fs command instead:

For more information, please visit the AMW Docs: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html

How To Fix “IOError: [Errno 10] No child processes” When Running the aws CLI Command from Perl WWW-REST-Apid

Author: , December 3rd, 2020

Problem While running the aws cli command from a Perl async command inside apid, I go the following error:

Solution The issue turned out to be a bug in Python2.7, so I upgraded to Python3.4, then uninstalled and re-installed the aws cli software so that it used the proper Python34 version. Procedure

https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html […]

How To Install MySQL 8.0 on AWS Linux 2

Author: , November 18th, 2020

How To Upgrade Certbot, Python and PIP on AWS Linux 1

Author: , May 6th, 2020

I ran letsencrypt-auto renew and got the following error:

The solution in this article gave me the answer:

Turns out Python was old at version 2.7, so did the following also:

Also had to change the cron job script to call certbot directly instead of letsencrypt-auto : vi /root/letsencrypt-cron.sh