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.

2 Likes

@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?

@nturner, is this still an issue for you?

Sorry, didn’t see that this was waiting for a response. Running “maas --help” on an Ubuntu 20.04 workstation prompts the user to “sudo apt install maas”. Doing so installs the maas server software (and prompts the user to initialize the server). Is the intention that anyone who wants to interact with a maas server needs to install the whole maas snap package on every workstation that needs a maas CLI client?

i don’t know; i’d guess that’s a “yes” but i need to check it out.

In 20.04, the maas package you get via apt install maas is just a transitional package which installs the maas snap, and as you said also provides a wrapper to the snap maas command.

The snap contains both the server and CLI command, but the server won’t be initialized/started unless you run maas init.

@nturner, does the above help you out at all?

@billwear yes, in that it clarifies that the only supported maas CLI is the one in the server snap. (I gave up on using the maas CLI long ago and just coded up a tool using the MAAS Python API, for which there are standard, working packages on Ubuntu 20.04.) Anyway, thanks. I think this can be marked as resolved or whatever if that’s a thing here.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.