mConnect : v0.0.7
mConnect is small utility to manage ssh connection credentials. and allow you to connect any server smartly with mConnect.
Just download this repository and follow below steps.
sudo apt-get install -y sshpass
sudo git clone https://github.com/HarryTheDevOpsGuy/mConnect.git /opt/mconnect
sudo chown -R ${USER}:${USER} /opt/mconnect
sudo chmod a+x /opt/mconnect/mConnect
sudo ln -s /opt/mconnect/mConnect /usr/local/bin/mconnect
mconnect -v
if you got mConnect version after executing mconnect -v
command. it means you have install this perfectly.
There is inventory/hosts
or ~/inventory/hosts
file in project repository. you need to add your host related details in inventory/hosts
file.
#vim /opt/mconnect/inventory/hosts
## This is Variable file you can update this file accordingly.
MAIL_TO="[email protected]"
declare -A HOSTS=(
# Development Env
["ABC-DEV"]="[email protected]:secret_pass"
["ABC-QA"]="[email protected]:keyname.pem"
["ABC-Stage-New"]="[email protected]:private_key"
# You can add comments like below
# ["ABC-TEST"]="[email protected]:ur_pass_here"
)
All Private keys should be stored in ~/inventory/keys
directory. and key name should be updated in ~/inventory/hosts
(without key path) file accordingly.
Thanks
Hari
Profile : Hire me - harrythedevopsguy.github.io