Mostrando entradas con la etiqueta Ssh. Mostrar todas las entradas
Mostrando entradas con la etiqueta Ssh. Mostrar todas las entradas

Versions.sh

d
Nombre: Versions.sh
Autor: Damon Parker
Descripción: Shell script para encontrar las versiones instaladas de los Demonios Principales de un Servidor.
Visto en Damon Parker
#!/bin/sh

# $Id: versions.sh 30 2007-02-26 19:18:48Z damonp $
#
# Shell script to list versions of common server daemons and utilities
#
# Copyright (c) 2007 Damon Parker < damonp@damonparker.org >
# Licensed under the GNU GPL.  See http://www.gnu.org/licenses/gpl.html

# This script is not supported in any way.  Use at your own risk.
#

uname -a

if [ -f /etc/redhat-release ]; then
        echo
        echo Redhat Version:
        cat /etc/redhat-release
fi

echo
echo Apache:
httpd -v
php -v

echo
echo MySQL:
mysql -V

echo
echo Security:
ssh -V
openssl version

echo
echo Network:
/sbin/ifconfig
Leer más...

revoke-ssh.bash

d
Nombre: revoke-ssh
Autor: nixCraft.
Descripción: Script que permite remover una entrada del archivo ~/.known_hosts, muy útil cuando se ha reinstalado o cuando las llaves ssh han cambiado.
Visto en tty0
#!/bin/bash
# A simple shell script to clean (delete)  ~/.known_hosts file hostname entry.
# This is useful when remote server reinstalled or ssh keys are changed!
# -------------------------------------------------------------------------
# Copyright (c) 2007 nixCraft project [http://cyberciti.biz/fb/]
# This script is licensed under GNU GPL version 2.0 or above
# -------------------------------------------------------------------------
# This script is part of nixCraft shell script collection (NSSC)
# Visit http://bash.cyberciti.biz/ for more information.
# -------------------------------------------------------------------------
 
host="$1"
 
[[ $# -eq 0 ]] && { echo "Usage: $0 host.name.com"; exit 1;}
 
ips=$(host "$host" | awk -F'address' '{ print $2}' | sed -e 's/^ //g')
ssh-keygen -R "$host"

for i in $ips
do
  ssh-keygen -R "$i"
done

exit $?
Permisos de ejecución: chmod 700 revoke-ssh.bash 
Ejecución del script: ./revoke-ssh.bash nombre.dominio o ./revoke-ssh.bash IP.
Leer más...