SwerveBot


vscode连接开发板

<p>默认开发板hostname为x501,如果是x502、x503......自行修改</p> <ol> <li> <p>为sunrise用户创建ssh密钥</p> <pre><code class="language-bash">ssh sunrise@x501.local -p 22 &amp;quot;curl -sfL https://gitee.com/linuxfly/script/raw/master/make_rsa_pub.sh | bash -&amp;quot;</code></pre> </li> <li> <p>将sunrise用户公钥复制到本机</p> <pre><code class="language-bash">#windows系统 scp -P 22 -o &amp;quot;StrictHostKeyChecking no&amp;quot; sunrise@x501.local:/home/sunrise/.ssh/id_rsa %HOMEPATH%/.ssh/id_sunrise_rsa_x501.key #linux系统 scp -P 22 -o &amp;quot;StrictHostKeyChecking no&amp;quot; sunrise@x501.local:/home/sunrise/.ssh/id_rsa ~/.ssh/id_sunrise_rsa_x501.key</code></pre> <pre><code class="language-bash">#如果x501开发板重新生成了ssh密钥导致本机公钥无法匹配,需要清除连接信息 ssh-keygen -R x501</code></pre> </li> <li> <p>下载vscode适合操作系统的版本并安装 <a href="https://code.visualstudio.com/download">https://code.visualstudio.com/download</a></p> </li> <li> <p>安装插件</p> <ul> <li>Remote-SSH</li> <li>c++</li> <li>python</li> <li>ros</li> <li>chinese</li> <li>docker</li> <li>file-icons</li> <li>其他需要的插件</li> </ul> </li> <li> <p>打开vscode,按下Ctrl+Shift+P,在弹出窗口中输入Open SSH Configuration Files…,选择第一个(xxxx/.ssh/config)</p> </li> <li>输入以下内容 <pre><code>Host sunrise.x501.local HostName x501.local User sunrise Port 22 ForwardX11 yes ForwardX11Trusted yes ForwardAgent yes IdentityFile ~/.ssh/id_sunrise_rsa_x501.key</code></pre> <p>windows下需打开MobaXtrem,并且登陆后才能进行X11转发 linux下x11转发,需要在终端输入</p> <pre><code class="language-bash">export DISPLAY=localhost:10.0 #测试 xclock</code></pre></li> </ol>

页面列表

ITEM_HTML