Allow login using the CLI only

Bug #1942626 reported by Heitor
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju

Bug Description

It is frustrating to have to open a browser to log in a juju controller, afterall `juju` is a CLI tool.

It is common for us to have to log in multiple times consecutively, because the time it takes to start a browser in a remove SSH session to a server far away sometimes is greater than the timeout of a Juju command.

This is a weird pattern to log in.

Please add a way for us to log in using CLI tools only.

Some examples of CLI programs that allow us to login in the CLI and integrates well with other CLI tools:
- openSSH
- git

Revision history for this message
Erik Lönroth (erik-lonroth) wrote :

I totally agree. Swapping between a terminal and a web browser is a unnatural workflow and should be better off to prompt of use some kind of local cli credentials...

Revision history for this message
Ian Booth (wallyworld) wrote :

Have you tried the -B login option?

juju help login
Command Options:
-B, --no-browser-login (= false)
    Do not use web browser for authentication

In this case, a CLI based prompt for username, password, 2fa is used.

Revision history for this message
Heitor (heitorpbittencourt) wrote :

$ juju models -B
Opening an authorization web page in your browser.
If it does not open, please open this URL:

And no CLI based prompt.

Using Juju client 2.9.12

Revision history for this message
Ian Booth (wallyworld) wrote :

It seems you've found a bug in -B handling.

It works with juju login -B <controllername> but not it seems with other commands like juju models.

As a workaround for now, you can "juju login -B <controllername>".
(I tested with juju login -B jaas")

Changed in juju:
importance: Undecided → High
status: New → Triaged
milestone: none → 2.9-next
Revision history for this message
Heitor (heitorpbittencourt) wrote :


I tried with `juju login -B` and it didn´t work: it opened the browser again. The controller name makes a difference here.

Is it possible to configure Juju to use the CLI login as the default?

Harry Pidcock (hpidcock)
Changed in juju:
importance: High → Wishlist
milestone: 2.9-next → 3.1-beta1
Changed in juju:
milestone: 3.1-beta1 → 3.2-beta1
Changed in juju:
milestone: 3.2-beta1 → 3.2-rc1
Changed in juju:
milestone: 3.2-rc1 → 3.2.0
Changed in juju:
milestone: 3.2.0 → 3.2.1
Changed in juju:
milestone: 3.2.1 → 3.2.2
Changed in juju:
milestone: 3.2.2 → 3.2.3
Changed in juju:
milestone: 3.2.3 → 3.2.4
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.