Search code examples
linuxsshdebian-jessie

Linux log server permission denied


I'm trying to copy few log files from the server to the local machine for further analyzing. I can log in the server with ssh and enter in the directory.

I try to copy the files with the command, scp root@logs.company.com:/srv/log/2018-05-08/payyex_prod_wallet_log /home/cherryl/Desktop

In the terminal I get output, Permission denied (publickey).. What should I do? I use a Debian 8 machine.


Solution

  • Sometimes the issue comes from permissions and ownership. maybe you just have the read privilige on that file, run an ls -l to know the priviliges you have on that file, if it is read only then try to modify them with a chmod command if you have the priviliges to do that.