By uploading your SSH keys to you can access all your machines through, have a shell prompt from your browser and even let take care of enabling monitoring to your machines. You also can have run commands to your machines during provisiong or after an alert is triggered.

Add a new key

When adding a new key, you have 2 choices. Either upload a local ssh-key to, or ask to generate one for you.

When uploading a local ssh-key, you have to provide the private ssh-key as a string. So first you can:

with open("/home/user/.ssh/my_key") as f:
    private =

You now have the private key and can add a new key to

client.add_key(key_name="MyKey", private=private)

Or have generate a randon one for you:

private = client.generate_key()
client.add_key(key_name="MyKey", private=private)

After adding a new key, client.keys will be automatically updated.

Keys actions

To see all added keys:


The result will be a dict like this:

{u'MyKey': Key => MyKey, u'asd': Key => asd, u'newKey': Key => newKey}

You can now choose a key:

key = client.keys['MyKey']

You have the option to set a key as the default one. This becomes handy if you want to auto-assign this key to a machine if you leave the association blank:


You can rename the key:


Finally, to delete the key:


See mist.client.model.Key class for detailed information.