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:
Newer versions of macOS meed you to manually add the key to the keychain
For current macOS versions please add the key and follow this instruction to make it active also after a reboot.
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).
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:
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: