SSH login without password

Sometimes it is convenient to be able to do a remote ssh access without the need for entering a password every time. ssh has a functionality that allows to do a assword-less automated access when using authenticated ssh keys. For this tutorial we assume that ssh access is enabled on the device and within the qbee platform. Automated ssh login only works with the qbee-connect tool and not in the web UI as we do not store any private keys on the platform.

Remote access can be done by exchanging proper ssh keys

By creating a public private key pair on one machine and registering the public key with the remote machine a ssh access without password is possible.

On the desktop machine running qbee-connect you need to generate a pair of authentification keys. Please run ssh-keygen -t rsa but do not enter a passphrase:

user@my-machine~ % ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/user/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /Users/user/.ssh/id_rsa.
Your public key has been saved in /Users/user/.ssh/id_rsa.pub.
The key fingerprint is:
XXXXXXXX-XXXXXXXX-YYYYYYYYYYYY-YYYYYYYYYYYY
Then copy the public key from your /Users/user/.ssh/id_rsa.pub. This key needs to be distributed to all devices that should be accessed automatically. Open the "Configure->SSH Keys" menu. Then select the device or the group of devices this key should be distributed to. Add the user and the public key (any user can have multiple keys).

distribute-ssh-key

The next time the agent runs on the devices in scope it will add this public key to the keychain. When this is done then a log entry confirms this:

log-ssh-key

Now the devices are prepared for automated remote access. Just start qbee-connect and connect one or many devices on port 22. In our case we connect to the device with user "pi". Calling the mapped port with the command ssh -p 63518 pi@localhostwill automatically log into the device:

qbee-connect-automated-ssh

automated-ssh-login