Skip to main content

mrg-iot login

Log in to the SPHERE portal and store the session for later commands.

Usage​

mrg-iot login [--username USERNAME] [--password-stdin]

Arguments​

ArgumentDescription
--username, -uUsername to log in as. Skips the username prompt.
--password-stdinRead the password from stdin instead of prompting.

Details​

  • With no flags, login prompts for the username and password and gives you 3 attempts.
  • If you are already logged in, login says so and does nothing. Run mrg-iot logout first to switch accounts.
  • The session is written to ~/.mrg-iot/session.json with mode 0600.
There is no --password flag

On Linux any user can read another process's arguments from /proc/<pid>/cmdline, and on every platform the command line lands in shell history and CI logs. Use --password-stdin or MRG_IOT_TOKEN instead.

mrg-iot login when a session is already saved, naming the logged-in user and pointing to mrg-iot logout to switch accounts

Examples​

mrg-iot login # prompt for username and password
mrg-iot login -u myuser # prompt for the password only
mrg-iot login -u myuser --password-stdin < secret.txt

See also​