Pages

Thursday, June 29, 2017

Pscp – Transfer/Copy Files to Multiple Linux Servers Using Single Shell

Pscp utility allows you to transfer/copy files to multiple remote Linux servers using single terminal with one single command, this tool is a part of Pssh (Parallel SSH Tools), which provides parallel versions of OpenSSH and other similar tools such as:
  1. pscp – is utility for copying files in parallel to a number of hosts.
  2. prsync – is a utility for efficiently copying files to multiple hosts in parallel.
  3. pnuke – it helps to kills processes on multiple remote hosts in parallel.
  4. pslurp – it helps to copy files from multiple remote hosts to a central host in parallel.
When working in a network environment where there are multiple hosts on the network, a System Administrator may find these tools listed above very useful.
Copy Files and Directories to Multiple Linux Servers
Pscp – Copy Files to Multiple Linux Servers
In this article, we shall look at some useful examples of Pscp utility to transfer/copy files to multiple Linux hosts on a network.
To use the pscp tool, you need to install the PSSH utility on your Linux system, for installation of PSSH you can read this article.
  1. How to Install Pssh Tool to Execute Commands on Multiple Linux Servers
Almost all the different options used with these tools are the same except for few that are related to the specific functionality of a given utility.

How to Use Pscp to Transfer/Copy Files to Multiple Linux Servers

While using pscp you need to create a separate file that includes the number of Linux server IP address and SSH port number that you need to connect to the server.

Copy Files to Multiple Linux Servers

Let’s create a new file called “myscphosts.txt” and add the list of Linux hosts IP address and SSH port (default 22) number as shown.
192.168.0.3:22
192.168.0.9:22
Once you’ve added hosts to the file, it’s time to copy files from local machine to multiple Linux hosts under /tmpdirectory with the help of following command.
      ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
                                                    ► Read more: http://adf.ly/1nBge2
      ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

No comments:

Post a Comment