I want to copy a couple of .txt files from a server using scp, but I get a permission denied error. I have the password for the server and when I directly connect to their server the password works, but whan I use scp for transferring the data, I get permission denied! I use the following command:scp -r user@server:/opt/drop/PATH /path/to/localdirError: Permission denied
scp command for copying to local computer
scp
Make sure you have permission to destination path /path/to/localdir otherwise you will get permission deniedthe fully command syntax is like this:scp sourceuser@sourcehost:/path/to/source/file destinationuser@destinationhost:/path/to/destination/