Category: Linux
-
Django and postgres 15
Connecting to postgres 15 is a bit of a challenge. Hope this helps: As for the django part: And you need to set pg_hba.conf to (see noted line, and restart postgres):
-
Tor repo problem: EXPKEYSIG 74A941BA219EC810 deb.torproject.org archive signing key
Getting any of these? It seems the archive key was changed. The correct one is at: For me it helped to place this file in `/usr/share/keyrings/tor-archive-keyring.gpg` :
-
SSH in for loop (consuming stdin / using file descriptor 3)
Ever found yourself using a for/while loop using SSH in the loop, only to find out your loop only runs once? Your stdin is captured by ssh… This can be fixed.
-
SSH jump host config
My remote hosts are on srvXX.remote.com. I have a jump host jump.remote.com. I want to be able to type ssh srv42.remote.com and connect, without first having to ssh to jump.remote.com. My .ssh/config:
-
LineageOS recovery bootloop into Google firmware
Don’t follow the original guide You need to boot dtbo and boot too. Thanks to: https://www.reddit.com/r/LineageOS/comments/11y3aur/comment/jdafm2k/?utm_source=share&utm_medium=web2x&context=3
-
Nextcloud / php / apache no error for Internal Server Error
I got this: If you want to know more, enable log_errors
-
Friendly (ionice/nice) rsync on remote server
Add –rsync-path=”ionice -c 3 nice rsync” to your rsync command (on sending side) Friendly for both sender and receiver: ionice -c3 nice rsync –rsync-path=”ionice -c 3 nice rsync”
-
LVM commands not found
Getting this? Means you might have used su. Just do su – or do a proper login, so your $PATH is set correctly.
-
Simple SSH backup of routeros / mikrotik
Prerequisites: Howto: 1. Create ssh keys (without passphrase) on the linux host: ssh-keygen 2. Copy ~/.ssh/id_rsa.pub , put in a .txt file, upload to routeros 3. Create a read only user 4. In the user menu, go to SSH keys, add the SSH key to the user 5. Add cronjob on linux host:
-
Fix: acosh defined in both go and assembly
You probably upgraded go. You need to remove /usr/local/go . Then reinstall go
-
Upgrade dumb shell to interactive shell (tty)
python -c ‘import pty; pty.spawn(“/bin/bash”)’ yay python
-
bash add IP in PWD to variable for easy reference
Add to .bashrc: export PROMPT_COMMAND=”${PROMPT_COMMAND:+$PROMPT_COMMAND ;} ip=\$( echo \$PWD | grep -oE ‘[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}’ ) ” Now if you browse to/in a directory which has an ipv4 ip, the IP will be stored in the $ip variable.
-
Easy AutoRecon summary (bash)
echo “===SUMMARY===”;grep . */report/notes.txt| while read line; do IP=$( echo -ne $line|cut -d’/’ -f1| tr -d ‘\n’ ); [[ x$IP != x$PREVIP ]] && echo; echo -n $IP ; echo -n $line | cut -d\] -f2- | grep –color=always ‘ .* found’ ; PREVIP=$IP; done; echo
-
Proxychains on fedora / centos7
Clone the repo: ./configure && make && sudo make install cp src/proxychains.conf /etc/proxychains.conf && vi /etc/proxychains.conf echo “alias p=’/usr/local/bin/proxychains4′” >> ~/.bashrc && . .bashrc p ssh xx@ip