Scp only files with defined extension

scpshell

I want to transfer only files with special extensions (like only *.tar.gz, *.war) in one scp command (Debian Linux). Is this possible, if yes how is the syntax?

Should be someting like:

scp 192.168.1.2:/srv/myfiles/'*.tar.gz *.war' .

But this is not working.

Best Answer

This absolutely is possible

scp 192.168.1.2:/srv/myfiles/\{*.tar.gz,*.war\} .