Skip to content

Instantly share code, notes, and snippets.

Issue Cause Fix
Bind to port 22 failed Port occupied by systemd Disable ssh.socket
Cannot bind any address Another daemon using port Stop conflicting service
sshd.service failed Syntax issue sshd -t to test config
Can connect only on one port Firewall blocking Allow both ports
Ubuntu 24.04 stuck on 9.6p1 Repository limitation Use source install
Source build fails Missing dependencies Install libpam0g-dev libselinux1-dev
Risk Mitigation
Lockout on upgrade Keep current sshd running on 22 while testing new one on 2222
Config errors Tested in isolation with its own config dir
Service clash Different PID, port, and config paths
Easy rollback Old binaries/configs backed up
Production uptime No downtime during validation
@amolxops
amolxops / AWS CLI Installation
Last active September 1, 2024 09:31
DevOps Engineer Toolkit: Installation
# Install AWS CLI on Linux
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
# Install AWS CLI on macOS
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
# Install AWS CLI using Homebrew
@amolxops
amolxops / gist:e7aa65a636c7d03c74510a7ffcec65f4
Created September 1, 2024 08:06
Install the gcloud CLI
########## Install the gcloud CLI #############
https://cloud.google.com/sdk/docs/install#deb
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates gnupg curl
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list