I am trying to get scp
to work and transfer a file from a remote server to my local. I tried looking around and this post helped the most but it still is not working here is the current output.
<HOSTNAME>:chef4-rep
<USERNAME>$ sudo scp -i ./.chef/<NAME>.pem <USERNAME>@<IP>:/home/postgres/post_0604_dump/db0604_schema_and_data.sql ~/
<USERNAME>@<IP>: Permission denied (publickey).