So let's install ptvsd both on the Pi and on the DEV machine. Now that we can SSH onto the Pi we need to setup the dependencies for remote debugging. ssh should get a command prompt on the Raspberry Pi. Replace the IP with your Pi's IP address. On your DEV machine test out the connection. Consult your router manual on how to do that. You may also want to give a static IP to it so you don't have to change the configuration we'll make further down after every reboot. Copy the content of id_rsa.pub from your DEV machine into the authorized_keys file. Inside there should be a file called authorized_keys. If the directory doesn't exist create it. On your Pi go to Raspberry Pi Configuration and make sure under Interfaces that SSH is enabled. Now that we have the keys we need to copy the public key ( id_rsa.pub) onto your Raspberry Pi. The command will generate two files, typically under /Users/yourname/.ssh/id_rsa* And there won't be any security issues as long as you keep the private key safe. When prompted for a passphrase hit Enter again. When prompted for the file in which to save the key just hit Enter to use the default path. On your DEV machine open a command prompt or terminal and run: ssh-keygen To do this we need to generate an SSH key pair. The first thing we need to do is setup SSH public key authentication because as part of the remote execution we need to copy the python scripts onto the Pi and we don't want to be prompted for the password every single time or have the password written in some config file. Setup SSH public key authentication between the Pi and the dev machine
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |