Is a Private Key on a Linux Client Used in SSH Authentication to a Remote Server?

Question
This website (https://kb.iu.edu/d/aews) says “On the SSH command line: Add the -i flag and the path to your private key.”

When running an SSH command, you do not think that the client’s private key would not come into play. You think that the public key would be used. The man page for SSH says

-i identity_file
Selects a file from which the identity (private key) for public key authentication is read

ssh will also try to load certificate information from the filename obtained by appending -cert.pub to identity filenames.

How Do You Log Out of cj.com (aka Commission Junction)?

Problem scenario
You have logged into the CJ website. You want to log out. What do you do?

Solution
Click your name/company name in the upper right hand corner. You should see “Login Manager”, “Privacy Policy”, “© Commission Junction LLC”. Underneath those three things there is a light gray bar that may almost blend in with the background. It says “Logout” in possibly faint gray (medium gray) letters.

How Do You List the ELBs in Your AWS Account when You Know One Exists But the Command You Run Shows None?

Problem scenario
You run an AWS CLI command to list load balancers. It returns none. You know there are load balancers. What should you do?

Solution
Run these commands:

aws elb describe-load-balancers
aws elbv2 describe-load-balancers

(It could be that you have a newer load balancer or an older style load balancer. If you run both of the above commands,

What is a Bootstrap DNS Server?

Question
What is a bootstrap DNS server? When is a bootstrap DNS server needed?

Answer
In computing the term “bootstrap” can mean to initiate a self-sustaining process (the source is this posting). A bootstrap DNS server is a DNS server that allows other domain name entries (such non-IP addresses) to be found by finding a DNS server. If you have hostnames in an /etc/hosts file or similar configuration,

How Do You Find What GUI/Desktop Environment Your Linux Server Is Using?

Problem scenario
There is a GUI desktop environment that your Linux machine is using. You want to know which one it is. What do you do?

Possible Solution #1
Run these commands:
sudo ps -ef | grep gnome
env | grep -i xdg

Possible Solution #2
echo $XDG_CURRENT_DESKTOP
echo $DESKTOP_SESSION

(Taken from https://unix.stackexchange.com/questions/46305/is-there-a-way-to-retrieve-the-name-of-the-desktop-environment)

Possible Solution #3
This command may give you clues if it is gnome: whereis gnome

Possible Solution #4
In the desktop GUI,

How Do You Print Out Aggregate Cryptocurrency Information Based on a Date Range?

Problem scenario
You want to print out the average cryptocurrency price along with the minimum and maximum prices based on a range of dates. What do you do?

Solution
This solution only goes back to 2015 for BTC. For other cryptocurrencies, the oldest price data is usually more recent than that.

Prerequisite
This assumes you have installed pandas: pip install pandas
If you need assistance installing pip,

How Do You Write a Palindrome Testing Program in Python That Ignores Punctuation and Spaces?

Problem scenario
You want to write a palindromic testing program without importing any modules that ignores a string’s punctuation or spaces. What do you do?

Solution
Use this program:

def is_palindrome(s: str) -> bool:
# i moves forward, and j moves backward
i, j = 0, len(s) -1
while i < j:
while not s[i].isalnum() and i < j:
i += 1
while not s[j].isalnum() and i < …

What Are The Differences between Built-In Commands, Utilities, System Calls and Non-System Calls?

Question
You want to know what the differences are between built-ins, utilities, system calls and non-system calls. What are some examples of these?

Answer
You can break down the answer into four categories of Linux commands. You have commands that are either built-ins or utilities. You have commands that are either system calls or they are not. Here is a diagram for four types of commands and their examples:

BuiltinsUtilitiesSystem Callschown, …

What Do You Do If There is Play in the Handlebars of Your Folding Bike?

Problem scenario
You have a collapsible bicycle (for commuting in a big city), and the handle bars have play in them. What should you do?

Solution
Verify the mechanism for securing the bike in “riding mode” is in place. Some folding bikes have latches that help secure the handle bars in place. If you forgot a step like this,