Adding SSH keys with maas-cli - regression?

It looks like the old version of the maas CLI (the on packaged for apt on Ubuntu 18.04) supports adding an SSH key for a user. There are lots of docs on the web about how to do this with the “maas sshkeys” command.

My understanding is that this version of maas-cli is obsolete and the one that can be installed via “snap install maas-cli” is the supported version. This new version does not appear to have an sshkeys command. Has this functionality moved?

The old CLI is not deprecated. Once, there were plans on deprecating it, but development of the new CLI stalled, so the old CLI is still the supported one.

@bjornt thanks, that’s good to know. I ran into some problems with https support in the old CLI, and debugging led to discussions that indicated that the new CLI had replaced the old one (sorry; can’t find the link right now).

One thing that may add to the confusion here – in Ubuntu 20.04, /usr/bin/maas is a shell script that just calls /snap/bin/maas and tells you to install the snap version of the CLI – so to the naive observer, it really looks like the old CLI is deprecated and replaced by the snap CLI.


@nturner, that’s useful feedback. looks like there are doc things that need to be done.

btw, as the tech author, and for engineering purposes only, i’m trying to get a handle on CLI users/scripters and the size of their networks. can you share how many machines, racks, etc., you’re using? you can make it a private message if you want, this is strictly for engineering use and won’t get transferred to sales or marketing. tia.

My deployment is pretty small scale. Usually around 100 machines, about 80 of which are small VMs carved out of bare metal using the awesome “Register as MAAS KVM host” deploy option. Just a single rack+region controller at the moment, though I expect to grow this over the next year.

1 Like

thanks, @nturner, that’s exactly what i’m looking for. very helpful.

Just out of curiosity, since I now know that the “old” maas CLI is the supported one, what is the supported way to get the supported maas CLI installed on an Ubuntu 20.04 LTS system?

i think it should be installed as part of your MAAS install? have you tried maas --help on your 20.04 system?