Aliases to facilitate connect on servers based on a json file.
Technologies that are being used:
Create a .env file with the following information:
At least create the BT2 variable 'cause it's the default value (e.g: BT1, BT2, BT3 or BT3_VPN):
BT2 = "<balabit ip>"
SH variable with the current bash that you are using:
SH = "<your bash path>" (e.g SH = "~/.zshrc")
Create a file credentials.json with the following structure:
{
"testHostname": {
"user": "userTest",
"pass": "passwordTest",
"description": "descriptionTest",
"env_type": "DEV"
},
}
After it, exec the commands below on the root folder:
build - compile the binary to create the alias.
install - create the alias to make your life easier.
make build
make install
Add a hostname
ssh-conn add -n hostaname -u user -p password -d description -e DEV
Connect to a hostname
ssh-conn conn -host <hostname>
Change a hostname
ssh-conn change -n testeHostname -u userTest -p passwordTest -d descriptionTest -e DEV
List all hostname available
ssh-conn list
Use help to lean more information about it
ssh-conn -h or --help