0
pscp -h host.txt terminal.sh /Desktop/terminal.sh

I tried this command to copy the file terminal.sh from my Desktop to my client Desktop using pscp but I got these errors:

[1] 22:34:05 [FAILURE] 10.20.10.214 Exited with error code 1
[2] 22:34:05 [FAILURE] 10.20.10.201 Exited with error code 1

How can I copy that file from my computer to multiple client computers?

2 Answers 2

1

just use

pslurp -h hosts.txt /Desktop/terminal.sh

this command upload files on multiple servers. pslurp is part of pssh package.

0

Use this command instead.

pscp -h host.txt -l <username> -Av terminal.sh /tmp/

I think you are getting the error because of permission issue.(Assuming that there is actually a directory under / named Desktop)

Or if you want to copy that file to home directory of a user, then you might need to cross check the destination path specified in your command.

Normally user home directories are under /home/ directory. So if you haven't changed your client machine's home directory,you can try the following command to copy the file.

pscp -h host.txt -l <username> -Av terminal.sh /home/<username>/Desktop/

If the above given command doesn't solve your problem, you can generate error log using the following command. So that you can understand whether the issue is due to file permission or authentication failure, etc.

pscp -h host.txt -e error -Av terminal.sh /Desktop/terminal.sh
2
  • Thank you this command is working! how can i retrieve files from my clients computers? Dec 20, 2017 at 13:05
  • @TharmalingamMayuran I don't think there is such a option available. You need to run the command from the remote machine i think.
    – ran
    Dec 20, 2017 at 13:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .