Last active
March 14, 2017 19:41
-
-
Save heckctor/042f9c030f4a279ba76e3b9e27c7330d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# -*- ENCODING: UTF-8 -*- | |
rojo='\033[0;31m' | |
verde='\033[0;32m' | |
amarillo='\033[0;33m' | |
cian='\033[0;36m' | |
nada='\033[0m' # Sin Color | |
archivo=equipokiubix.zip | |
url=http://git.kiubix.link/documentacion/ssh/ | |
ruta=$HOME/.ssh/ | |
claves=$ruta/equipo_kiubix | |
if [ ! -e $claves ]; then | |
if [ ! -e $ruta ]; then | |
printf "${rojo}No tienes instalado ssh, ${verde}se procederá a instalar${nada}\n" | |
sudo apt install ssh | |
fi | |
wget $url$archivo | |
printf "${cian}Descargando Claves${nada}\n" | |
sleep 5s | |
printf "${cian}Instalando Claves${nada}\n" | |
sleep 5s | |
unzip $archivo -d $ruta | |
printf "${cian}Configurando la clave del servidor${nada}\n" | |
chmod 600 $ruta/equipo_kiubix* | |
ssh-agent | |
ssh-add $ruta/equipo_kiubix | |
printf "${verde}Ya quedó tu equipo configurado :)${nada}\n" | |
else | |
printf "${amarillo}Ya habias configurado las claves del servidor,${nada}${verde} que despistado eres :P${nada}\n" | |
exit | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment