As long as you have a user account on the server you can create ssh key and then copy it over. SSH key can me be more secure than a password as long as your using RSA.
@@mohitguptaji Thanks for the reply, I am totally new to scripting but my boss assigned me this task, we have 40 servers and from all these servers I have to take backup of cronjob using a single script. Please suggest example which I can understand
@@mohitguptaji these servers doesn't support ansible.... I can copy but every time it is asking passwd.... expect/spawn not working....and if I copy and when I try to execute this script I should be a root user....how do I elevate my privilege as root user....root passwd is diff for all 70 servers and we can't make any changes to sudoers file/ssh config
@@gangadharpavan either you need direct access of root in remote machine already configured. Or you need to add that user in /etc/sudoers.d/user file with an entry which allows user to use sudo without password
Uptime will show you how long your systems has been up since the last reboot. It will also show you the load average of the system. From left to right 1 minute, 5 minutes and 15-minute averages I believe. Doing this off memory so I might be a little off on time.
How to invoke the the script on multiple servers from one server like when you run sh runScript.sh on 192.168.122.145 it should start on one more server say 192.168.122.183
You can join me on my whatsapp group for quick free queries and solution
chat.whatsapp.com/E96jXVnZacM8MzffHKJkpv
Join
Awesome. Just what I needed.
Thanks!
Thank you every one who like and subscribe my channel , i will upload mpre like this m working on many videos.
very good video..thanks for sharing
please subscribe
password should be same for both hosts? If i use RSA token does it help ?
How can we execute multiple commands from one server on multiple remote machines ??
Use Ansible
How to run the shell scripts in one go for multiple servers without using ansible..any alternative please
this is not my personal machine to create and play with ssh-key-id, im not sure does im having access to create those keys
As long as you have a user account on the server you can create ssh key and then copy it over. SSH key can me be more secure than a password as long as your using RSA.
Using single script I have to take backup of crontab on multiple servers, could you please suggest how ?
You can cat the file /var/spool/cron/USERname into a file name with server specific name in order to take backup
@@mohitguptaji
Thanks for the reply,
I am totally new to scripting but my boss assigned me this task, we have 40 servers and from all these servers I have to take backup of cronjob using a single script.
Please suggest example which I can understand
thanks, but how do we copy a file to 70 linux servers from 1 server and execute that file as root from sitting on 1 server ?
Instead of running the sample command you could used scp with the PSSH
Or you can use ansible script for this task
@@mohitguptaji these servers doesn't support ansible.... I can copy but every time it is asking passwd.... expect/spawn not working....and if I copy and when I try to execute this script I should be a root user....how do I elevate my privilege as root user....root passwd is diff for all 70 servers and we can't make any changes to sudoers file/ssh config
@@gangadharpavan either you need direct access of root in remote machine already configured.
Or you need to add that user in /etc/sudoers.d/user file with an entry which allows user to use sudo without password
You kay join our whatsapp group or more help
@@mohitguptaji thanks much
what is the significance of "uptime" ?
Uptime will show you how long your systems has been up since the last reboot. It will also show you the load average of the system. From left to right 1 minute, 5 minutes and 15-minute averages I believe. Doing this off memory so I might be a little off on time.
please subscribe to my channel and hit the bell icon
How to invoke the the script on multiple servers from one server
like when you run sh runScript.sh on 192.168.122.145
it should start on one more server
say 192.168.122.183
In this video it is explained already you just need to create host file and add servers then run commands
Im facing error Exited with code 255
Find the pinned comment and join our whatsapp community and post your query with screenshot.
@@mohitguptaji I had posted My query in the group..Kindly check it
@@shahbaz3949 sure