Category: Reliable Penguin

Converting SSH2 Public Keys for Use in authorized_keys

When working with SSH keys, you may encounter different formats depending on the tool that generated the key. For example, PuTTYgen and older Windows tools often produce keys in the SSH2 public key format, which looks like this:

Linux and OpenSSH, however, expect a different format for the ~/.ssh/authorized_keys file. If you try to paste the above directly, SSH will reject it. Fortunately, converting between formats is straightforward. Step 1: Save the SSH2 Key Copy the entire block, including the BEGIN and END lines, into a file. For example:

Paste the contents, then save and exit. Step 2: Convert to OpenSSH Format Use the ssh-keygen tool to convert the key:

This tells ssh-keygen to import (-i) the SSH2 key and write the OpenSSH version into id_rsa_converted.pub. Step 3: Inspect the Converted Key Open the new file:

You’ll see a single line similar to this:

Notice

Read More »

Installing `mongorestore` on Ubuntu 22.04

When working with MongoDB, the mongorestore utility is an essential tool for restoring databases from BSON dump files. On Ubuntu 22.04, mongorestore is included in the MongoDB Database Tools package, which is distributed separately from the MongoDB server. This guide walks you through the installation process step by step. Step 1: Import the MongoDB Public GPG Key Before adding the MongoDB repository, you need to import its public GPG key:

Step 2: Add the MongoDB APT Repository Add the MongoDB repository to your system’s APT sources:

Step 3: Update the Package List Update the local package index to include the new MongoDB repository:

Step 4: Install the MongoDB Database Tools Install the tools package, which includes mongorestore along with other utilities such as mongodump, mongoimport, and mongoexport:

Step 5: Verify the Installation Confirm that mongorestore is installed and available on your system:

You should see

Read More »

How to Install the PostgreSQL Client on Ubuntu 22.04 and 24.04

Whether you’re managing cloud-hosted databases or working in a containerized environment, the PostgreSQL client is an essential tool for developers, sysadmins, and database engineers alike. This article walks you through installing the PostgreSQL client on Ubuntu 22.04 (Jammy Jellyfish) and Ubuntu 24.04 (Noble Numbat)—two of the most widely used LTS releases. What Is the PostgreSQL Client? The PostgreSQL client includes tools like psql, which allow you to connect to PostgreSQL servers, run SQL queries, perform backups, and administer remote databases. It’s commonly installed on application servers, staging environments, and development machines to interact with databases hosted elsewhere. Which Version Should I Install? Both Ubuntu 22.04 and 24.04 come with a default version of PostgreSQL in their package repositories: Ubuntu Version Default PostgreSQL Client Version 22.04 (Jammy) 14 24.04 (Noble) 16 If you’re fine using the default version, installation is straightforward. If you need a newer or specific version, you can

Read More »

How-to Change UUID Of A Disk

When cloning or restoring disk volumes is possible to run into problem which conflicting UUID values. Each disk volume needs to be assigned a unique UUID. The UUID is store on the volume. A cloned or restored disk will have the same UUID as volume from which it was generated. By default you are not allowed to mount two volumes with the same UUID. This can overcome with the “nouuid” mount option: mount -o nouuid /dev/xvdg1 /mnt Often a server will be configured to select the root partition on boot by UUID. This makes is easy to ensure that the right volume is selected as the root. But if you have two volumes with the same UUID then the kernel will randomly select which volume to mount. This situation can occur when you’ve mounted a cloned or restored copy of the root volume and then reboot without removing the clone.

Read More »

“find” Newer Files & Sort By Date

Sort “find” results by date:

Find files newer then a specific file:

And combined:

   

Read More »

Categories

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.