roboRIO用户帐户和SSH

备注

本文档包含通常的FRC®编程中不需要的高级主题。

roboRIO映像包含许多帐户。本文将重点介绍用于FRC的两个帐户,并提供有关其用途的一些详细信息。本文还将介绍如何通过SSH连接到roboRIO。

roboRIO用户帐户

roboRIO映像包含许多用户帐户,但其中有两个主要用于FRC。

admin

“管理员”帐户具有对系统的根权限,可用于操纵系统文件或设置。团队在使用此帐户时应格外小心,因为它可以修改可能损坏roboRIO操作系统的设置和文件。该帐户的凭据为:

``用户名:admin’’

密码:

备注

密码是故意留白的。

lvuser

“ lvuser”帐户是用于运行所有三种语言写成的用户代码的帐户。此帐户的凭据不应被更改。在开发roboRIO,团队可以使用该帐户(通过ssh或sftp),以确保对文件或设置所做的任何更改和代码运行都在同一账号下完成。

危险

Changing the default ssh passwords for either “lvuser” or “admin” will prevent C++, Java, and Python teams from uploading code.

SSH协议

SSH (Secure SHell) is a protocol used for secure data communication. When broadly referred to regarding a Linux system (such as the one running on the roboRIO) it generally refers to accessing the command line console using the SSH protocol. This can be used to execute commands on the remote system. OpenSSH is included by default on Windows, macOS, and Linux.

Connect via SSH

To connect to the roboRIO, open a terminal or command prompt and run:

ssh admin@roboRIO-TEAM-frc.local

Replace TEAM with your team number (e.g., ssh admin@roboRIO-40-frc.local for team 40).

If you are connected over USB you can use 172.22.11.2 as the hostname:

ssh admin@172.22.11.2

If your roboRIO is set to a static IP you can use that IP as the hostname if connected over Ethernet/wireless.

登录

When you see the password prompt, press enter (the password for both accounts is blank). You can also connect as the lvuser account by replacing admin with lvuser in the commands above.

If you see a prompt about host authenticity when connecting for the first time, type yes and press enter to continue.