- using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
- using inventory:
127.0.0.1 ansible_connection=local
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^b w | |
New new -s <session> Create ^b c | |
Attach att -t <session> Rename ^b , <name> | |
Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
Kill kill-session -t <session> Close ^b & |
#Read multiple keys from an authorized_keys file and print the finger print | |
[root@server01 .ssh]# while read line; do ssh-keygen -l -f /dev/stdin <<< $line; done < authorized_keys | |
2048 87:7a:4d:70:d2:10:a4:4b:b7:e1:2b:7c:77:92:25:04 /dev/stdin (RSA) | |
2048 7d:f0:89:94:00:09:bc:70:46:59:8d:9a:70:3b:ac:70 /dev/stdin (RSA) | |
2048 61:63:ee:0d:f6:d2:d8:d6:ae:37:0c:35:ae:da:51:6a /dev/stdin (RSA) | |
#read a key from authorized key file | |
[root@server01 .ssh]# ssh-keygen -l -f authorized_keys | |
2048 87:7a:4d:70:d2:10:a4:4b:b7:e1:2b:7c:77:92:25:04 authorized_keys (RSA) |
ansible-playbook --connection=local 127.0.0.1 playbook.yml
127.0.0.1 ansible_connection=local
# +-------+ +----------+ +-----------+ | |
# | Laptop| <---> | Jumphost | <--> | FooServer | | |
# +-------+ +----------+ +-----------+ | |
Host JumpHost | |
User ec2-user | |
HostName xx.xx.xx.01 | |
# Add these 2 lines so we don't have to manually run 'ssh-add [key]' | |
UseKeychain yes | |
AddKeysToAgent yes |
#!/bin/bash | |
set -xe | |
# This script takes as a parameter the name of the VM | |
# and creates a linked clone | |
# Ref: https://unix.stackexchange.com/a/33584 | |
# The scripts assumes that it runs from the same folder | |
# where the vm image is located and it coincides with the | |
# image name |
Create a new systemd user unit, which starts ssh-agent
upon login to server. Will remain resident until the final session for the user has logged out.
Create /etc/systemd/user/ssh-agent.service
.
Run the following commands (under your user account, not root
) to install the systemd unit and start:
CIDR SUBNET MASK CHEATSHEET & ICMP TYPE CODES | |
https://oav.net/mirrors/cidr.html | |
_____________________________________________________________________________ | |
Netmask Netmask (binary) CIDR Notes | |
_____________________________________________________________________________ | |
255.255.255.255 11111111.11111111.11111111.11111111 /32 Host (single addr) | |
255.255.255.254 11111111.11111111.11111111.11111110 /31 Unuseable | |
255.255.255.252 11111111.11111111.11111111.11111100 /30 2 useable | |
255.255.255.248 11111111.11111111.11111111.11111000 /29 6 useable |
#!/bin/bash | |
# Imports DoD root certificates into Linux CA store | |
# Version 0.4.1 updated 20241216 by AfroThundr | |
# SPDX-License-Identifier: GPL-3.0-or-later | |
# For issues or updated versions of this script, browse to the following URL: | |
# https://gist.github.com/AfroThundr3007730/ba99753dda66fc4abaf30fb5c0e5d012 | |
# Dependencies: curl gawk openssl unzip wget |