I have the following files in a remote machine:

└── selenoid
    ├── browsers.json
    ├── run.sh
    └── Logger.java

I want to copy run.sh and browsers.json from the remote machine to my local machine. I know how to copy a single file from the remote machine:

scp [email protected]:/home/aerokube/selenoid/browsers.json .

But how can I copy both browsers.json and run.sh from the remote machine?

2 Answers 2


Try this:

scp -T [email protected]:"/home/aerokube/selenoid/browsers.json /home/aerokube/selenoid/run.sh" .
  • In some cases -T might not work, so try with and without it.
  • I am getting this message: protocol error: filename does not match request Nov 28, 2019 at 15:23
  • Worked after adding the -T flag! Nov 29, 2019 at 5:55

You can do this:

scp '[email protected]:/home/aerokube/selenoid/{browsers.json,run.sh}' .

You need the quotes so that expansion takes place on the remote side. Without it, it will work, but you might have to enter the credentials twice.

  • This would likely require that the remote user's login shell understands brace expansions.
    – Kusalananda
    Nov 28, 2019 at 15:04

You must log in to answer this question.

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