Skip to content

Instantly share code, notes, and snippets.

View PackeTsar's full-sized avatar

John W Kerns PackeTsar

View GitHub Profile
@PackeTsar
PackeTsar / byobu-ssh-cheatsheet.md
Last active November 9, 2024 11:19
Byobu (over SSH) Cheat Sheet

Byobu (over SSH) Cheat Sheet

I often find myself using Byobu on a Linux machine when connected to it over SSH. In doing so, I've noticed that many of the documented keyboard shortcuts don't work. This can be due to the native PC's OS intercepting certain keys, or possibly other reasons.

Below is a cheatsheet with Byobu features I have found usually work when run over a SSH connection.

Action Windows + Putty to Ubuntu MacOS + Terminal to Ubuntu
Help menu BASH: byobu-config FN-F1
Create new window CTRL-a c CTRL-a c or FN-F2
@PackeTsar
PackeTsar / newuser.sh
Created October 12, 2021 16:30
Use a different user on each login
# /root/newuser.sh
#
# Create and use a new user every time you log in.
#
# Setup:
# ~$ nano newuser.sh
# *paste contents of this file and save*
# ~$ chmod +x newuser.sh
# ~$ echo "bash newuser.sh" >> ~/.profile
@PackeTsar
PackeTsar / zabbix-server-5.0-setup.md
Last active April 26, 2022 17:28
Zabbix Server 5.0 Setup

Zabbix 5.0 Setup Steps

My standard steps for setting up a new Zabbix server

This example is tuned for an install on a Raspberry Pi, but can be adapted to any Linux box

All commands are being run while logged in as root

@PackeTsar
PackeTsar / zabbix-server-6.0-setup.md
Last active June 20, 2024 08:55
Zabbix Server 6.0 Setup

Zabbix 6.0 Setup Steps

My standard steps for setting up a new Zabbix server

This example is tuned for an install on Ubuntu 20.04 Server, but can be adapted to any Linux box

All commands are being run while logged in as root

@PackeTsar
PackeTsar / Add_Netbox_User.sh
Created February 18, 2023 17:35
Add Netbox User via Script
#!/usr/bin/env bash
# Set API key env variable like:
# export NETBOX_API_KEY="blahblahblah"
# Usage: ./Add_Netbox_User NETBOX_HOST USERNAME FIRST_NAME LAST_NAME EMAIL GROUP_ID PASSWORD
# Example: ./Add_Netbox_User netbox.example.com will.riker William Riker [email protected] 1 TroiFan1
if [[ -z "$NETBOX_API_KEY" ]]; then
echo "Must provide NETBOX_API_KEY in environment" 1>&2
echo " Example: export NETBOX_API_KEY='blahblahblah'" 1>&2
@PackeTsar
PackeTsar / Linux_SNMP_MIBs_Set_Up.md
Last active August 20, 2024 14:52
Linux SNMP MIBs Set Up

Linux SNMP MIBs Set Up

Install SNMP MIBs on Ubuntu and add in Cisco MIBs

apt install snmp snmp-mibs-downloader

download-mibs

# Test MIB path, should fail this time
@PackeTsar
PackeTsar / zabbix_server_6-to-7_upgrade.md
Created September 3, 2024 13:59
Zabbix Server 6-to-7 Upgrade

Zabbix Server 6-to-7 Upgrade

Backup Files

  • Partial backup of the database
sudo mysqldump --no-data zabbix > zabbix_backup.sql