1.) Create a Key on the RPI and import it
ssh-keygen -b 4096 ssh-copy-id -i .ssh/id_rsa.pub pi@rpi3
(rpi3 is in this case my Raspberry )
2.) Copy the private key from rpi
([Username] is the windows username)
~/.ssh/id_rsa to c:\Users\[Username]\.ssh\id_rsa ~/.ssh/id_rsa.pub to c:\Users\[Username]\.ssh\id_rsa.pub
3.) Remove the Keys from the rpi and check if the authorized_keys updated
pi@rpi3:~/.ssh $ rm id_rsa pi@rpi3:~/.ssh $ rm id_rsa.pub pi@rpi3:~/.ssh $ ll total 8 -rw------- 1 pi pi 733 Mar 5 22:15 authorized_keys -rw-r--r-- 1 pi pi 222 Mar 5 22:15 known_hosts pi@rpi3:~/.ssh $
4.) Activate ssh_agent in the Windows Services and set it to automatic
5.) Start the Agent in Gui or with command net start ssh-agent
net start ssh-agent
6.) Import the Key to the agent
([Username] is the windows username)ssh-add c:\Users\[Username]\.ssh\id_rsa_rpi3
7.) To connect without password to the RPI over windows SSH use this command
ssh pi@rpi3
Keine Kommentare:
Kommentar veröffentlichen