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_archive_directory=$HOME/logs;mkdir ${log_archive_directory};script ${log_archive_directory}/$(date +%Y%m%d_%H%M%S)_$(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

tech/sak/sak.txt · Last modified: 2021/07/25 09:04 by wnoguchi