I struggle to copy from a PI zero to a Pi 3 without a password for a couple of days and nothing works properly. I have to copy some pictures from PiZero to Pi3 each time when a picture is taken without typing a password. Doesn’t matter if I use the command from PI 3 or Pi zero even if the both ways will be the best. It will be much easier to make a program on Pi zero and send the taken pictures to Pi3. But if I can copy them somehow from Pi3 from Pizero is ok. I mention that the network created is via USB but it works fine with VNC; Putty, etc. That is not a problem. I created some interfaces and the USB network has another IPs range.
I tried this:
https://www.raspberrypi.org/documentati ... ordless.md
On Pi 3:
That creates a folder .ssh and some files hee in /home/pi/.ssh/
Looking inside directory I found:
id_rsa id_rsa.pub known_hosts
I have not seen a file named authorized_keys
Then I created a folder with the same name on pizero(IP 10.0.11.2) and copy the content of the id_rsa.pub into an authorized_key in this .ssh folder on pizero from pi3:
cat ~/.ssh/id_rsa.pub | ssh firstname.lastname@example.org 'mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys'
I have seen on pi zero the folder .ssh was created and inside I found tho files:
known_hosts and authorized_keys
authorized_keys files has exactly the same content like id_rsa.pub file, from pi3 as I expected.
Well, rebooting everything I then started ssh from pi3: ssh email@example.com (to login to pi-zero).
I still did not understand what is the role of this known_hosts file. I have written something but I am still confused. I will read more today.
Well, I was still asked for a password.
I tried to reconfigure the Pi zero so that it need not a password:
SO I TRY TO DEACTIVATE THE PASS LIKE THIS:
https://raspberrypi.stackexchange.com/q ... spberry-pi
I noticed that I can use only nano to edit this file:
I changed this lines as I was advised in that link:
I remove # where there was an inactive line and replace yes with no.
I was looking for :
I found PubkeyAuthentication and could make the changes but can not find (I tried with all possible editors and “find” tools). There is not such a thing like RSAAuthentication in this configuration file:
Well, after making all this changes things are even worse. I got the error message: “permission denied”. I understood that this will not happen if I replace for this lines yes with no:
and put “no” instead of "yes". As I mention I could not find the line named RSAAuthentication.
It seems to be something that is supposed to be easier.
I tried also to mount a directory of pizero, so that I can share some files. That would have been a nice and elegant method.
https://www.raspberrypi.org/documentati ... h/sshfs.md
After upgrade-update all the systems I installed:
sudo apt-get install sshfs
I created a directory on pi3 named pizero1 (Because from Pi 3 I will see there content from pizero1). I created a directory also on pizero named pi3. The content of pi3 can be seen now in pizero1 folder on Pi3.
I tried this:
sshfs pizero firstname.lastname@example.org:/home/pi/pi3
or using complete path:
sshfs email@example.com:/home/pi/pizero1 firstname.lastname@example.org:/home/pi/pi3
on short :
sshp path/to/shared_on_pi3 pizero@ip_pi_zero:/ path/to/shared_on_PIzero
Or the name instead of IP:
Well, this time WORKED but only form pi3 to pizero. If I put something in the shared folder on pi3 I can see it in the shared folder in pizero, but I need exactly the other way around. On the other hand, I reinstalled and then upgrade-update both systems a couple of times but nothing works. For such a simple thing I can live days of torture. All I can do is connecting one device to another and make whatever I want on the other device. I can also copy with scp but only with passwords.
All this truly make me sick and give me awful headaches and days of frustration.