-
Edit ssh config of your system
vim ~/.ssh/config
Paste the following content:
Host *
ServerAliveInterval 30
ServerAliveCountMax 5
TCPKeepAlive yes
Host bastion
HostName <bastion-ip>
User <username>
- Login to bastion and hop to to interested server
ssh bastion
ssh ubuntu@<'server-ip'> -i ~/.ssh/<private-key>
: Use team specific private key stored in
~/.ssh
directory on bastion server.
example - ssh ubuntu@<'server-ip'> -i ~/.ssh/fabric_team
- To access database
ssh bastion
mysql --defaults-file=<cnf-file-path>