PG1X WIKI

My Knowledge Base

User Tools

Site Tools


tech:sak:sak

Swiss Army Knife

Billion

sudo virsh list --inactive | sed -e '1,2d' | fgrep -v template | awk '{ print "sudo virsh autostart --disable", $2 }' | sed -e '$d' | bash
sudo virsh list --inactive | sed -e '1,2d' | fgrep -v template | awk '{ print "sudo virsh autostart", $2 }' | sed -e '$d' | bash
sudo apt update && sudo apt upgrade --auto-remove
sudo apt update && sudo apt upgrade --auto-remove && sudo systemctl reboot
sudo update-alternatives --config editor

clear Linux terminal.

Ctrl + L
clear

Knifes

logging

log_directory=$HOME/log; [[ ! -d ${log_directory} ]] && mkdir ${log_directory}; script ${log_directory}/$(date +%Y%m%d_%H%M%S.%N)_$(whoami)@$(hostname -f).log

curl and bash

curl and save to file

curl https://gitlab.pg1x.com/wnoguchi.keys -o .ssh/authorized_keys

wget and save to specified file name

wget https://gitlab.pg1x.com/wnoguchi.keys -O .ssh/authorized_keys

Verify Server Fingerprint

ssh-keygen -l -f /etc/ssh/ssh_host_ecdsa_key.pub
ssh-keygen -E sha256 -l -f /etc/ssh/ssh_host_ecdsa_key.pub
ssh-keygen -E md5 -l -f /etc/ssh/ssh_host_ecdsa_key.pub

ssh / scp without ssh key verification

alias issh='ssh -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no"'
alias iscp='scp -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no"'
alias isftp='sftp -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" -q'

Open Temporary File and Edit

Windows

Documentation

Networking Test Network

0.0.0.0/8           "This" Network             RFC 1122, Section 3.2.1.3
10.0.0.0/8          Private-Use Networks       RFC 1918
127.0.0.0/8         Loopback                   RFC 1122, Section 3.2.1.3
169.254.0.0/16      Link Local                 RFC 3927
172.16.0.0/12       Private-Use Networks       RFC 1918
192.0.0.0/24        IETF Protocol Assignments  RFC 5736
192.0.2.0/24        TEST-NET-1                 RFC 5737
192.88.99.0/24      6to4 Relay Anycast         RFC 3068
192.168.0.0/16      Private-Use Networks       RFC 1918
198.18.0.0/15       Network Interconnect
                    Device Benchmark Testing   RFC 2544
198.51.100.0/24     TEST-NET-2                 RFC 5737
203.0.113.0/24      TEST-NET-3                 RFC 5737
224.0.0.0/4         Multicast                  RFC 3171
240.0.0.0/4         Reserved for Future Use    RFC 1112, Section 4
255.255.255.255/32  Limited Broadcast          RFC 919, Section 7
                                               RFC 922, Section 7
tech/sak/sak.txt · Last modified: 2021/10/02 14:07 by wnoguchi