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:
- pscp – is utility for copying files in parallel to a number of hosts.
- prsync – is a utility for efficiently copying files to multiple hosts in parallel.
- pnuke – it helps to kills processes on multiple remote hosts in parallel.
- 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.
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.
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.
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.
No comments:
Post a Comment