Connecting to the drone with VSCode
Install VSCode onto your computer (not the drone), here
Open a terminal window on your computer and run:
cd ~/.ssh
ls
If you do not see
id_rsa
andid_rsa.pub
, enter this command:
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
Do not enter a filepath, username, or password, just press ``return`` when asked for those fields
Enter
cat id_rsa.pub
and copy the whole ssh key that is printed to your terminal
Open a terminal window that is SSH’d into your drone:
cd ~/.ssh ls vim authorized_keys
Navigate the bottom of the file, press
i
to enterinsert
mode, and paste your id_rsa.pub key. Then save and quit (pressesc
, then:wq
)
In your computer’s terminal (in the ~/.ssh folder) type:
vim config
Add the following block (4 spaces, not tabs):
Host <teamname>
User uav
HostName <teamname>.beaver.works
ForwardX11 yes
IdentityFile ~/.ssh/id_rsa
Try SSH’ing into the drone in a new terminal. You should be able to use simply
ssh <teamname>
. You also should not have to enter the drone password anymoreIf this works, go to VSCode:
Click the square icon in the sidebar under the debug icon
Search for SSH and install the “Remote-SSH” plugin made by Microsoft
Select the monitor icon that appears in the sidebar, then click the window icon that appears when you hovor over your teamname option under
Connections