Handle lots of servers at one time
As a devops engineer, I have to handle, config, and monitor different linux servers at the same time. While connecting the servers ssh, remembering all those pemfiles and hosted IP makes little bit awkward.
So I have one master server where I manage all pemfiles and connect quickly and easily. I'll show how I perform such task easily today.
First of all I should have pemfiles of child server, and master server.
Now time to add the host on ssh-config file:
Now you have successfully config for master server badmin:
After getting connected to master server. Time to config others too:
Make sure you have given correct pemfiles, username and hostname properly. You can change hosts as per your requirements.
Now you can access servers without any burden.
The best part is that you don't need to connect ssh with hostname and pemfiles and this process also makes your task more smoothly.
I personally suggest to use tmux : terminal multiplex for your daily tasks.
Now, ctrl + b then press d to Disattach the session from terminal. But your tasks will run in background.
Then, you can also try again for another server:
Same as the autodeploy you can disattach the session.
Later, if you want to attach the previous session, you can try this command:
Disattach is same ctrl + b then type d .
This is the way, you can handle lots of linux server at the same time. This is the easiest and simplest form too manager servers.
Last updated