How to copy file on server / list of servers from local host using bash script

preview_player
Показать описание
This tutorial will describe how to copy a file from local host to multiple servers using bash script.
It uses linux ubuntu command line, and vim editor to write script and an online server to copy a file.
Рекомендации по теме
Комментарии
Автор

Hello...want to create script which will copy file from one server to another server but it should not ask for password prompt...I am not able to use sshpass, expect or ssh key gen as I am not authorised to install anything on server...Is there other option I can try or any command??

samy_kdl
Автор

hello, could you make another video about how to copy log file from server to local using script scp and cronjob please?

umahmuslimah
Автор

I have a computer running Ubuntu 20.04 server. It has several users on it. For example user001, user002, user003 etc. Each user has the same folder in the same location, just with differing data. We'll call it Default for example. How would you create a bash script that copies the Default folder from all users to another location that has a folder with the name of each user? The location would have /user001/Default, /user002/Default and so on. I'm brand new to bash scripting and the best I could come up with was to write out cp -vua /user001/Default /destination over and over. It works, but it's rather inelegant and I just haven't found any solutions to my needs. Thx.

Viking
Автор

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 ?

gangadharpavan
join shbcf.ru