I want to copy over .jpg
and .png
files with scp
, but there files with different extensions in the same folder I'm copying from. I am doing the following:
scp user@someRemoteHost.com:/folder/*.{jpg,png} .
I am asked to enter my password for each extension type. Is there a way to do this in such a way that I enter my password only once?
scp -r user@someRemoteHost.com:'/folder' .
should do it. Else if you still want to copy only png and jpg in those subdirectories you probably can't use scp or sftp (unless sftp/lftp with possible custom script) but need to run something like ssh + a pair of tar instead. You'd have to ask your own question with the specific needs then. – A.B Jul 24 '19 at 12:18"
also work besides single ones. – Timo Apr 28 '22 at 10:13