SSH: Running Applications Built with Eclipse*
The following describes how to run a built application on a "remote target" system using an SSH connection.
If your application requires a password-less SSH connection, see Password-less Access to a Remote Linux* Target Device.
This section assumes:
- you already have an Eclipse project
- have successfully built an application from that project
- have some familiarity with Eclipse
- remote target is already configured for remote access via SSH
Create a Connection within Eclipse by selecting the New Connection option:
Select the SSH Connection type and click Next:
Enter your remote targets Hostname and Username. You can either use Key-based authentication or Password, depending on the configuration of the remote device.
You may also be then prompted to set an Eclipse Secure Storage password. This protects the password you entered when stored on the disk. Enter the password and click OK.
When connecting to the device for the first time, you should be prompted to trust the device. Click Yes to continue.
Once a connection has been defined within Eclipse, open the the Run Configurations window to create your configuration.
Double-click on the "C/C++ Remote Application" configuration type.
This will create a run configuration for you project.
- Set two properties on this view:
- Select the connection you created earlier.
- Define a location on the remote system where Eclipse will copy your project's binary. Your use-case may dictate where your binary must be copied to, but often a location your user has write permission to, such as /tmp/, will suffice.
- Click Apply to save your configuration.
- Click Run to run your project on the remote device.
You should see the output in the console of Eclipse.
Note that you can re-use the same connection and launch configuration for debug too. Your remote device will need at least gdbserver in the PATH environment variable.