Traditional SSL Certificate renewal for occurs every year and yet somehow that proves time and again to be just long enough to forget the process and lose confidence in conducting what should be a simple routine task. Here is a reminder of the step by step process of genenerating the CSR and combining the bundle into key and cert that we can use for an nginx reverse proxy, or whatever...
tmux is a terminal multiplexer that allows you to create, manage, and navigate multiple terminal windows and panes within a single terminal session. It's particularly useful for working on remote servers or managing multiple tasks simultaneously in a single terminal window.
Here's my brief cheatsheet on how to use tmux:
Sometimes you just need to serve a folder over http immediately!
Here are some quick one-liners to start a temporary webserver.
All of the following examples serve pwd
, so make sure you cd ~/the-folder-you-wish-to-share
first.
Use docker apache httpd:alpine
This will automatically gene...
Initial Authentication
assume
aws sso login
Connecting to a linux AWS EC2 instance using SSM
aws ssm start-session --target $INSTANCE_ID
Port forwarding MongoDB from remote linux AWS EC2 instance to local using SSM
aws ssm start-session --target $INSTANCE_ID --document-name AWS-StartPortF...
Here are some reminders for securely generating SSH keys.
How to generate a modern ED25519 SSH key
To generate a good default ssh key in the default path ~/.ssh/id_ed25519
:
ssh-keygen -t ed25519 -a 100
To generate a good SSH key with specified output file path ( -f
) and descriptive c...
Restic is a fast, secure, and efficient backup program that supports deduplication, encryption, and data integrity verification.
Using Restic:
-
Installation: Install restic on your system, see restic installation
apt install restic
-
Initialization: Initialize a new repository for yo...
xclip
is a command-line utility for interacting with the clipboard in Linux systems. It allows you to copy data to the clipboard from the command line or retrieve data from the clipboard into the terminal.
The screen
command in Linux allows users to manage multiple terminal sessions within a single window, facilitating remote access and session persistence.
Using Screen
-
Start a new screen session:
screen
-
Detach from the current screen session: Press
Ctrl + A
, thenCtrl + D
. ...
SETUP PROCESS:
INITIAL USER:
adduser myuser
passwd myuser
gpasswd -a myuser wheel
su - myuser
mkdir .ssh
chmod 700 .ssh
vi .ssh/authorized_keys
chmod 600 .ssh/authorized_keys
SSH
Made the following modifications to /etc/ssh/sshd_config
:
Port 2222
PermitRootLogin no
MaxAuthTries 6
MaxSe...
Rsync and LFTP are wonderful tools for synchronizing files. Here are various examples.
LFTP
NOTE: If certificate errors prevent you from connecting to a trusted server, you can disable these errors permanently: echo “set ssl:verify-certificate false” >> ~/.lftprc
To connect to a server an...