lo atamo’ con alambre / argentine way: wired heatsink


Esto es lo que llamamos “lo atamo’ con alambre” en Argentina:

2013-10-31 14.13.08-2La pestaña que traba la varilla pasante sobre el disipador se quebró. Tuvimos que recurrir a una herramienta universal para sostener disipadores y coolers. Aquí esta herramienta se llama alambre.

2013-10-31 14.12.55-Gracias Ezequiel por el soporte !

eliminar claves del known_hosts / remove outdated ssh fingerprints keys from known_hosts


Aquí dos métodos para eliminar una clave o fingerprint del known_hosts por línea de comandos:

[hvivani@test ~]$ ssh 10.0.1.145
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
14:7e:6a:1f:c7:7b:ff:c1:df:4f:f7:d1:20:68:54:78.
Please contact your system administrator.
Add correct host key in /home/hvivani/.ssh/known_hosts to get rid of this message.
Offending key in /home/hvivani/.ssh/known_hosts:39
RSA host key for 10.0.1.145 has changed and you have requested strict checking.
Host key verification failed.

1) Con sed:

[hvivani@test .ssh]$ sed -i "39d" /home/hvivani/.ssh/known_hosts

2) Con ssh-key-gen

[hvivani@test .ssh]$ ssh-keygen -R 10.0.1.31

 

script: copia remota de respaldos


Script para copia remota de respaldos o backups, con búsqueda filtrada por antiguedad.

#!/bin/sh
#hvivani. 20130327
#copia archivos de respaldo a servidor remoto.

for f in `find /backup/db/ -mtime -3 -name '*'`
do
 scp $f hvivani@backup.hvivani.com:/backup/db/
done

Previamente debemos generar las claves para poder utilizar el comando scp sin necesidad de ingresar la clave.