Friday, December 3, 2021

SSH no funciona raspbian - Failed to start OpenBSD Secure Shell server.

sudo service sshd restart

Job for ssh.service failed because the control process exited with error code.

See "systemctl status ssh.service" and "journalctl -xe" for details.

-- The unit ssh.service has entered the 'failed' state with result 'exit-code'.

Dec 03 20:28:09 pbeltran.ddns.net systemd[1]: Failed to start OpenBSD Secure Shell server.

-- Subject: A start job for unit ssh.service has failed

-- Defined-By: systemd

ssh -t

ssh: error while loading shared libraries: /usr/lib/aarch64-linux-gnu/libgssapi_krb5.so.2: invalid ELF header

sudo apt-get install libgssapi-krb5-2 --reinstall

sudo service smbd stop

sudo systemctl disable smbd

sudo reboot

ssh: error while loading shared libraries: /usr/lib/aarch64-linux-gnu/libkrb5.so.3: invalid ELF header

sudo apt-get install libk5crypto3 --reinstall

ssh: error while loading shared libraries: /usr/lib/aarch64-linux-gnu/libkrb5.so.3: invalid ELF header

sudo apt-get install -y libkrb5-3 --reinstall


descargar un sitio completo en html - Scrape an entire website

 Scrape an entire website 

#linux

wget --recursive --html-extension --page-requisites --convert-links http://website.com


Consider HTTrack. It's a free and easy-to-use offline browser utility.

http://www.httrack.com/


basado

https://stackoverflow.com/questions/9265172/scrape-an-entire-website

Wednesday, November 17, 2021

Secondary DNS Server for DHCP - PI-Hole

Basado en : 

https://discourse.pi-hole.net/t/secondary-dns-server-for-dhcp/1874/4


sudo nano /etc/dnsmasq.d/02-pihole-dhcp.conf

dhcp-option=6,Pi-holeIP,SecondaryDNSIP

sudo service pihole-FTL restart

ejemplo aplicado : dhcp-option=6,192.168.1.2,8.8.8.8

Friday, November 12, 2021

DNS varios

 

156.154.70.22 DNS Comodo firewall

156.154.71.22 DNS Comodo firewall

200.28.4.130 DNS Movistar

200.28.4.129 DNS Movistar


Saturday, July 24, 2021

Detect HTTP or HTTPS then force HTTPS in JavaScript

necesitaba redireccionar una pagina en http a https


 if (location.protocol !== 'https:') {

    location.replace(`https:${location.href.substring(location.protocol.length)}`);

}


https://stackoverflow.com/questions/4723213/detect-http-or-https-then-force-https-in-javascript

Saturday, June 26, 2021

desintalar paquetes en modo debug huawei - remove package debug mode

 #para buscar packetes

# pm list packages | grep craft

pm uninstall -k --user 0 com.appblockgames.freecraftexploration

pm uninstall -k --user 0 com.google.android.youtube

pm uninstall -k --user 0 com.huawei.health

pm uninstall -k --user 0 com.huawei.videoeditor

pm uninstall -k --user 0 com.google.android.videos

pm uninstall -k --user 0 com.android.gallery3d

pm uninstall -k --user 0 com.huawei.gameassistant

pm uninstall -k --user 0 package:com.huawei.appmarket

pm uninstall -k --user 0 com.android.hwmirror

pm uninstall -k --user 0 com.huawei.himovie.overseas

pm uninstall -k --user 0 com.huawei.android.tips

pm uninstall -k --user 0 com.android.calendar

pm uninstall -k --user 0 com.google.android.apps.photos

pm uninstall -k --user 0 com.google.android.apps.maps

pm uninstall -k --user 0 com.huawei.phoneservice

pm uninstall -k --user 0 com.huawei.android.thememanager

pm uninstall -k --user 0 com.huawei.ridemode

Tuesday, June 1, 2021

Optimizar el consumo en RPI

 sudo nano /boot/config.txt

# Disable Bluetooth

dtoverlay=pi3-disable-bt

#deshabilitar los servicios de bluetooth

sudo systemctl disable hciuart.service

sudo systemctl disable bluealsa.service

sudo systemctl disable bluetooth.service


#rpi 4

#apagar hdmi 1, para encender cambiar 0 por 1.
vcgencmd display_power 0 2
#apagar hdmi 2
vcgencmd display_power 0 7

#si queremos bajar el consumo a nivel de CPU
sudo nano /boot/config.txt
arm_freq=1400