Skip to content

Instantly share code, notes, and snippets.

@levid0s
levid0s / ssh_to_router.txt
Last active December 23, 2023 20:56
SSH: Unable to negotiate, no matching key exchange method found
$ ssh [email protected]
Unable to negotiate with 192.168.1.1 port 22: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,[email protected]
$ ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -o PubkeyAuthentication=no -o PreferredAuthentications=password -o HostKeyAlgorithms=+ssh-rsa [email protected]
BusyBox v1.23.2 (2019-02-19 01:57:00 UTC) built-in shell (ash)
# sources:
# https://unix.stackexchange.com/questions/15138/how-to-force-ssh-client-to-use-only-password-auth
# https://unix.stackexchange.com/questions/340844/how-to-enable-diffie-hellman-group1-sha1-key-exchange-on-debian-8-0
@levid0s
levid0s / raspi_static_ip.sh
Created December 23, 2023 18:56
Raspberry Pi Set Static IP
# No DHCP Server
vim /etc/network/interfaces.d/eth0-static.conf
auto eth0
iface eth0 inet static
address 22.100.0.2
gateway 22.100.0.1
netmask 24
+ reboot
# Have DHCP Server on the network
@levid0s
levid0s / etc_config_acme
Last active December 23, 2023 05:17
OpenWRT Let's Encrypt
root@router:~# opkg list-installed | grep acme
acme-acmesh - 3.0.7-1
acme-acmesh-dnsapi - 3.0.7-1
acme-common - 1.0.3
# vim /etc/config/acme
config acme
option state_dir '/etc/acme'
option account_email '[email protected]'
option debug '1'
@levid0s
levid0s / openwrt_dns_force_redirect.conf
Created December 23, 2023 04:27
OpenWRT Force DNS via Adguard
root@router:~# uci show | grep redirect
firewall.@redirect[0]=redirect
firewall.@redirect[0].dest='lan'
firewall.@redirect[0].target='DNAT'
firewall.@redirect[0].name='Force DNS via Adguard'
firewall.@redirect[0].src='lan'
firewall.@redirect[0].src_ip='!192.168.4.2'
firewall.@redirect[0].src_dport='53'
firewall.@redirect[0].dest_ip='192.168.4.1'
firewall.@redirect[0].dest_port='53'
@levid0s
levid0s / proxmox_extend_disk.sh
Last active April 13, 2024 10:39
Proxmox Extend Host Disk
###
### Extend Host Disk Partition
###
# https://command-not-found.com/growpart
# https://forum.proxmox.com/threads/change-host-disks-how-resize-partition.90729/
apt-get install cloud-utils
growpart /dev/sda 3
pvresize /dev/sda3
@levid0s
levid0s / proxmox_crash_fix.sh
Created December 18, 2023 15:05
Dell Wyse 5070 Promox Nic Crash
# https://forum.proxmox.com/threads/system-hanging-after-upgrade-nic-driver.129366/page-2
echo "deb http://download.proxmox.com/debian/pve bookworm pvetest" | sudo tee -a /etc/apt/sources.list
apt update
apt install proxmox-kernel-6.2.16-18-pve
apt install proxmox-headers-6.2.16-18-pve
proxmox-boot-tool kernel unpin
reboot