I have a raspberry pi zero v1 and a raspberry pi model 3 B+. The second one has some testing files i want to transfer to the first one.
Right now i’m ssh’ed into both raspberry pi’s (I’ll call them rp’s for short). Rp Zero v1 doesn’t have Wi-Fi capabilities so I’m connected to the internet through the USB port in my PC, so i have accessed it via:
SSH [email protected]
And I’ve accessed the second one via:
SSH pi@<ip address>
Normally i use:
Scp <file> <path in original directory> <user I want to transfer to>:<path I want to transfer to>
To copy files from my pc to an rp, but I’m not sure what the user i want to transfer to is. I have tried
Scp <file> <original path> [email protected]:<destination path>
And
Scp <file> <original path> pi@<ip address>:<destination path>
Where <ip address>
is what I obtained from running the command:
Hostname -I
On the rp zero v1.
Neither of these work and I think I may be missing some conceptual understanding of how the rp zero v1 is connected to the internet. I would appreciate some guidance to understand that as well as how to transfer files without having to first transfer something to my computer.
scp [options] [local path] [remote path]
The local path is just a normal path, don't use something likeme@here:/foobar
. The remote path requires the remote user name (same as their login) and the hostname or IP:me@there:/absolute/path
. If it does not work,scp -v
will output some debugging information,scp -vv
more. Edit it in the output from the latter with the exact command you are using and be aware ofman scp
.ssh
andscp
commands are normally written with lowercase letters. On Windows it may be case-insensitive, but not on Linux.