This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Accessing the Shell on NI Linux Real-Time Devices

Updated Dec 1, 2023

Environment

Hardware

  • NI ELVIS III
  • CompactRIO Chassis

Operating System

  • Linux

I have a device running an NI Linux Real-Time Operating System. I would like to access the shell or terminal on this device. How can I do so?

In order to communicate with your device using either of the methods below, you must have a terminal client installed on your computer. 

Connecting with SSH:
  1. Power on and connect your device to your network or directly to your development computer.
  2. Open NI MAX and find your device under Remote Systems.
  3. You may have to log in to your controller to access its settings (the default username is admin, and the default password is left blank).
  4. Check the box by Enable Secure Shell Server (sshd) in the Startup Settings window.
  5. Save your changes and the target will reboot.
  6. Open your terminal client and specify a SSH connection.
  7. Add your target's IP address or Host Name in the appropriate destination field.
  8. SSH uses TCP port 22 by default, so please ensure that this port has been selected
  9. If the connection is refused, make sure that port 22 is not being used/blocked on the RT target. You can first do this by disabling the RT Startup App from NI MAX.

 
  • The terminal should display login as:
  • You can login with the admin account and any other account you have configured to have the RemoteShell permission with the NI Web-Base Configuration and Monitoring tool
  • Enter your account's password when prompted, and you will be logged into the shell​.

Connecting with Serial:
Some cRIOs feature an RS-232 port, which allows us to use commonly available null-modem serial cables to access the Linux shell. To communicate with your device using a null-modem cable, please complete the following steps: 
  1. Power on and connect your device to your network or directly to your development computer.
  2. Open NI MAX and find your device under Remote Systems.
  3. You may have to log in to your controller to access its settings (the default username is admin, and the default password is blank).
  4. Check the box by Console Out in the Startup Settings window.
  5. Save your changes and the target will reboot.
  6. Connect a null-modem cable to both your computer's and your target's RS-232 port. 
  7. Open your terminal client and specify a serial connection.
  8. Verify that the connection read speed matches your device's output rate. For example, the cRIO-906x outputs at 115,200 bits per second, so the connection read speed needs to match.
  • The terminal should display login as:
  • You can login with the admin account and any other account you have configured to have the RemoteShell permission using the NI Web-Based Configuration and Monitoring tool.
  • Enter your account's password when prompted, and you will be logged into the shell.

Additional Information

Note: The screenshots in this article use PuTTY, a third-party Telnet and SSH client, although any terminal client can be used.

The NI Linux Real-Time Operating System provides access to the Linux shell via secure shell (SSH) and serial communication. The SSH method relies solely on the device's network connection, but the serial method requires a null-modem cable and the appropriate type of serial port. As connecting to your device via SSH only requires a network connection, NI recommends using SSH as your primary shell access method. 

NI Linux Real-Time OS devices feature different serial interfaces and consequently have different console output methods. For more detailed information concerning communicating with your device directly, please refer to its specifications documentation or user manual. For example, you can communicate with the myRIO in safe mode using the built-in UART lines. Please refer to the Using the Reset Button section of the NI myRIO-1900 User Guide and Specifications  document for more information. 

Phar Lap ETS does not support SSH. To gain remote access while using Phar Lap ETS, you must use the serial connection technique.