SAM - Reuse ssh key

Whenever you connect to snips with SAM, an ssh key gets created. So after 10 connects, you have 10 keys stored in your authorized_keys-file. Isn’t it possible to create a key only once and reuse it on further connections?
And, why do I have to input username/password every time I want to connect?
And, why do I have to go through this procedure (sam connect) everytime when connecting to snips at “localhost”?

Am I doing something wrong here?


Hello @schnippi

You only need to connect once, it will generate & reuse the key each time for futher sam commands.

The duplicated authorized keys are due to the fact that sam doesn’t check if it can connect to the device without using your username / password combination (for sam connect) and by default generate a new ssh key (if one doesn’t already exists on the computer running sam) Sam is supposed to be run on a different machine then where the platform is running. Typically you install sam on a mac / linux / windows machine and the platform is installed on your Pi.

This will be improved in a future version.

Good to hear @Charles. Thx a lot!