When trying to transfer a file from PC to Pi I get the following error.
Permission denied, please try again.
I have tried several times with the same result. As it asks for the pi password I would have thought it was going fine. The following is the command entered.
scp testcode.txt email@example.com:Desktop/
Is there something not set up correctly in ’ config’
Thank you. BC
Welcome to the forums!
It is possible that your remote machine does not have the permissions set up right to allow a remote transfer. Try and check if that machine has the permissions adjusted correctly.
The other thing that may be blocking it is your firewall, check the firewall settings to see if it is blocking SSH connection or file transfer.
Blayden, Thank you for your response. Fortunately I did have the items you suggested in place.
I found an example online to send the file from the PC command line as below.
D:\temp> scp testcode.txt firstname.lastname@example.org:~/
Thanks you your help.
Is the following command valid? I’m unsure whether you can send directly to
The problem may have been with the file path.
perhaps try using absolute file paths eg.
Without knowing your exact requirements but if you don’t need to use the CLI you can try a GUI app like Cyberduck or your PC to transfer your files over SFTP. I use it all the time, you just log in with the username on your Pi. No special software needed on the Pi. Cyberduck is free, but it will prompt you to donate, but that’s optional.
Or set up a samba share and share a directory on your network
There’s definitely something satisfying about just sending it direct over CLI though
Hello Michael and Steven,
Using on the PC Windows PowerShell the following works successfully.
scp testcode2.py email@example.com:
It seems we must use pi@… and not bryanpi@…
I have placed the files on an external drive d: it is so much easier than the main drive.
I find writing the initial code in Notepad on the PC and then transfer to Nano on the pi.
All good thank you for your interest and response.