[emteria.OS] Using integrated SSH server

This article describes the required steps for the initial configuration and usage of the built-in SSH server. In the following example it will be assumed that your device either has a working ADB USB interface or a working network connection with local IP address 192.168.0.100.

Enable ADB Connections

For devices with support for ADB via USB

  1. Please enable the USB Debugging feature in Settings => Developer options.
  2. Connect the USB cable to your device and make sure it is detected by ADB:
 > adb devices
 > adb root

For devices without support for ADB via USB

  1. Please enable the ADB over Ethernet feature in Settings => Emteria.
  2. Connect to the device using correct IP address of your device:
 > adb connect 192.168.0.100
 > adb root

Setup Key-based Authentication

There are many different ways of logging into an SSH server, but for now emteria.OS only supports key-based authentication. This approach provides a simple, yet very secure way of remote control for your device.

  1. Generate a pair of SSH keys to be used for the authentication. Alternatively, you can use SSH keys which were automatically generated by emteria.OS during the first boot:
 > adb pull /data/ssh/ssh_host_rsa_key my_private_key
 > adb pull /data/ssh/ssh_host_rsa_key.pub my_public_key.pub
  1. Add the desired public key to the list of keys which will be allowed to establish a remote connection with this device:
 > adb push my_public_key.pub /data/ssh/authorized_keys

Disable ADB Connections

The ADB must be disabled in production devices, as it opens the possibility for attackers to control the system remotely. After setting up a secure SSH authentication, the ADB over Ethernet should be deactivated in Settings => Emteria.

Enable SSH Connections

  1. Activate the integrated SSH server in Setting => Emteria.
  2. Establish a connection to your device using the correct IP address:
 > ssh -i my_private_key root@192.168.0.100
 rpi3:/ # id
 uid=0(root) gid=0(root) groups=0(root), context=u:r:sshd:s0
Was this article helpful? Votes: 0
Article details:
Published date: 30/06/2018 8:06AM
Last updated: 30/06/2018 8:40AM (kalkov)
Share article: 
Author: kalkov
Permalink: https://help.emteria.com/kb/emteria-os-using-ssh-server
ssh | ssh server | public key |