SSH Keys help speed up login to your KOS targets. Developing embedded devices requires users to frequently log in to the device under development, which requires them to enter the password for that device multiple times.
It provide a simple way to bypass the password prompt on login, allowing for quicker logins and the ability to use local scripts to interact with your target. You can add SSH keys via the regular method of generating an SSH key pair and copying the public key to the remote server, but you will have to keep track of keys and update them when necessary.
KOS Studio simplifies this by automatically installing your keys as part of the software installation process when performed from your copy of KOS Studio. This means that you can set your SSH keys once in KOS Studio, and KOS Studio will automatically install your keys on every device you deploy to. KOS Studio stores SSH keys locally on your computer and keeps them exclusive to your copy of the software. Follow the instructions below to add your SSH public key to KOS Studio for easier device access.
Another common problem when developing for devices is the regeneration of device SSH keys on new installs, as well as IP addresses changing over time on devices. This can cause frequent SSH errors that indicate the keys have changed and that you need to remove the old device keys from the known_hosts file on your computer. Since this is such a common problem with device development, KOS provides a quick and easy solution in the form of an optional layer called kos-layer-sshhostkeys-fixed. By adding this layer to your images, every device you deploy to will have the same device side keys, minimizing the impact of changing IP addresses and fresh installs of test devices. You should not use this layer in production images as it creates a security risk.

Access the tool
- Launch KOS Studio and log in.
- From the My Images windows, click on Settings.
- Select SSH Keys from the settings menu.
View existing SSH keys
- Launch KOS Studio and log in.
- From the My Images windows, click on Settings.
- Select SSH Keys from the settings menu.
- SSH Keys opens in a new window where all SSH Keys for your devices are available. Consider following :
- If no SSH keys are present, the system displays no keys are present and asks the user to create a new one.
- Each key displays and provides the SSH key’s name and user name.
Add a new SSH key
- Launch KOS Studio and log in.
- From the My Images windows, click on Settings.
- Select SSH Keys from the settings menu.
- SSH Keys opens in a new window; click Add SSH key.
- This opens an Add New SSH Key pop-up.
- Provide the following information :
- Name: The name should be unique within your SSH keys.
- User: User for the SSH connection.
- Type: Choose between Text and File.
- Key: If the type is selected as text, copy the content of your public key.
- Key File: If the type is selected as File, use the file picker to select the location of your public key and the appropriate .pub file.
- Click on Add; this will add the SSH key to your KOS Studio account, which can then be used to connect to your targets. Consider the following :
- Once the SSH key has been added, the user can not update the provided key. So make sure correct information is provided at the time of creation.
Edit the SSH key
- Launch KOS Studio and log in.
- From the My Images windows, click on Settings.
- Select SSH Keys from the settings menu.
- SSH Keys opens in a new window, displaying all available SSH Keys.
- Select the SSH key you want to edit and click on the edit icon.
- This displays a Rename SSH key pop-up where you can edit the following information:
- Name: The name should be unique to your SSH keys
- User: User for the SSH connection
- Click on Update. Consider following :
- Once the SSH key has been added, the user can not update the provided key. So make sure correct key information is provided at the time of creation.
Delete a SSH Key
- Launch KOS Studio and log in.
- From the My Images windows, click on Settings.
- Select SSH Keys from the settings menu.
- The tool opens in a new window, displaying all configured keys.
- Select the item you want to delete and click the delete icon.
- The Delete confirmation pop-up displays, indicating that deleting will permanently delete the key.
- Click on Delete to confirm and delete the added SSK Key.
