Link to home
Start Free TrialLog in
Avatar of Thomas Anthony
Thomas AnthonyFlag for United States of America

asked on

Correct syntax for RPi scp file copy

I am trying to copy a file from a remote host to a raspberry pi I am logging into with Putty and I am having problems getting the correct syntax. Can someone please help?
I want to copy a file from (IP address)/video/Monday.mp4 to the local directory on the Pi I am puttied into which is /usr/lib/rs/imgs/

I am using the following command:>
scp /10.84.X.X/video/Monday.mp4 /usr/lib/rs/imgs/
ASKER CERTIFIED SOLUTION
Avatar of serialband
serialband
Flag of Ukraine image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Thomas Anthony

ASKER

Thanks for the quick reply. I am getting a "access denied". I have tried to start with the sudo -i to get into admin mode as well but it still says the "access denied". It asks for the password of the user: pi which I am typing in. It is the same as the one I use to Putty into but still get the error.
Are you sure you have the correct account?  Do you need to be root to reach the file and folder?
I don't know. I have tried excalating it and not. Both give me a deny. The only account I am told this app has is pi.
What account do you use to ssh to he Raspberry Pi?  Are you able to get to that file with that account when you ssh to the system?
Maybe you need the full path?
pi is the only account I use. I ssh with Pi
Along with this, I had to change the sudo password.

1. Enable the SSH login via root directly: change the password for the root user while SSH’d in as pi (sudo passwd root), then modify /etc/ssh/sshd_config with PermitRootLogin yes (sudo mc -e /etc/ssh/sshd_config). Finally restart ssh (sudo systemctl restart ssh).
2. Copy your files: scp /path/to/my/local/files/* root@RASPBERRY_IP:/usr/lib/rs/imgs/
3. Restart Raspberry Slideshow while in as root: systemctl restart rs
Actually, it's less secure to ssh to root with a password.  You should have just used ssh keys instead.
I understand and thank you. This is on a closed network for signage in our local building. Thank you.