diff --git a/README.md b/README.md index eab2a6b..b95608e 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,9 @@ -Introduction -============ - -This is the default repository for MeGaMoV Public SSH Keys - -## Adding me on you server - -Just getting the script from https://megamov.fr/ssh/add - ---- +Introduction ============ This is the default repository for MeGaMoV Public SSH Keys +## Adding me on your server ### Automatically -~~~ -wget https://megamov.fr/ssh/add -chmod +x add -./add -~~~ - +~~~ wget https://megamov.fr/ssh/add chmod +x add ./add ~~~ +> **Note:** You can choose one of the public keys from this repo by calling the script like this : ~~~ ./add rsa0520 ~~~ #### or - ### Manually - -~~~ -cd -wget https://megamov.fr/ssh/pub -mkdir .ssh -cat pub >> .ssh/authorized_keys -~~~ ---- - +~~~ cd wget https://megamov.fr/ssh/pub mkdir .ssh cat pub >> .ssh/authorized_keys ~~~ --- #### Copyleft © MeGaMoV diff --git a/add b/add index eccbd70..1dfcaf5 100755 --- a/add +++ b/add @@ -1,7 +1,7 @@ #!/bin/bash # VARIABLES -script_version="1.1" +script_version="1.2" ssh_keys_dir="$HOME/.ssh" netBaseDir="https://megamov.fr/ssh/pub" @@ -52,14 +52,6 @@ mega_banner() echo "+-------------------------------------------+" } -# Ask for the pub key version -mega_getKeyVersion() -{ - mega_show "The key have a specific name ?" - echo -n "NAME [default empty] : " - read keyVersion -} - # Check network by asking script mega_checkNet() { @@ -119,14 +111,11 @@ mega_show " Adding SSH Key of Nicolas @MeGaMoV" mega_show " v$script_version" mega_show -mega_getKeyVersion -keyURL="$netBaseDir$keyVersion" +keyURL="$netBaseDir$1" # Checking network res=$(mega_checkNet) if [ "$res" = 1 ]; then - mega_show - mega_show mega_showerror "[+] Err: Can't access megamov's server." mega_show mega_banner @@ -136,8 +125,6 @@ fi # Create .ssh DIR res=$(mega_sshDir) if [ "$res" = 1 ]; then - mega_show - mega_show mega_showerror "[+] Err: Can't create ssh folder" mega_showerror " $ssh_keys_dir" mega_show @@ -148,8 +135,6 @@ fi # Check if the key exist in server res=$(mega_checkPubKey) if [ "$res" = 1 ]; then - mega_show - mega_show mega_showerror "[+] Error: Unable do get the public key" mega_show mega_showerror "Please : Check if the NAME you entered" @@ -167,8 +152,6 @@ mega_addPubKey # Key the IP IP=$(wget -qO- ip.megamov.fr) -mega_show -mega_show mega_showsuccess " SSH Public key added !" mega_showsuccess " Access available from :" mega_show diff --git a/index.html b/index.html index e5140c1..7022e24 100644 --- a/index.html +++ b/index.html @@ -1,26 +1,24 @@ - - - -
-This is the default repository for MeGaMoV Public SSH Keys
-Just getting the script from https://megamov.fr/ssh/add
-wget https://megamov.fr/ssh/add
+MeGaMoV - Public SSH Key
+Introduction
+This is the default repository for MeGaMoV Public SSH Keys
+Adding me on your server
+Automatically
+wget https://megamov.fr/ssh/add
chmod +x add
-
./add
-cd
-wget https://megamov.fr/ssh/pub
-mkdir .ssh
-cat pub >> .ssh/authorized_keys
-++Note: You can choose one of the public keys from this repo by calling the script like this :
++./add rsa0520 +
cd
+wget https://megamov.fr/ssh/pub
+mkdir .ssh
+cat pub >> .ssh/authorized_keys
+
+