I could right click > git bash > and start bashing

I mean start logging into my ec2 instances by simply mentioning the key and the url I need to connect to

Now I need to know which ec2 instance i need to log into. Is it the development server, the pre production test server? It's also handy to have a file where you maintain all the url to copy-paste on the the bash prompt

If you observe, our devops guy just made a dumb bastion wrapper over our development server called beta-india. This means I need to first enter the bastion ec2 instance and then login to the actual dev ec2 from inside the bastion. This was his poc to safeguard a server from ssh access directly. Now, only those IPs registered with the bastard, I mean bastion can access the dev server (though dev server doesn't require such safeguards in principle, well, depends on the industry)

The tail command below is a quick way to reach the logs on that ec2 instance.

So we have a keys folder, you need git bash installed, you have a notepad file maintaining all your ssh commands. what else? We also have a scripts folder.

what the scripts folder does is you can use the .sh bash file that iterates through all .sql files in the script folder and runs each sql script. This is our way of take a git pull, finding new sql scripts in the scripts folder, doing a git bash ./runscripts.sh and running all the new structure changes

The sh file asks for the password, database name and it starts running the sql script.


This free site is ad-supported. Learn more