Authenticating Meshery via CLI
To authenticate Meshery through mesheryctl, the Meshery CLI, you will use the mesheryctl system login command. On executing this command, you will be provided with a list of providers to choose from. You can then select a Provider of your choice to complete the authentication and authorization process.
As of this writing, you will be presented with two providers, Layer5 and None.
Use the arrow keys to navigate: β β β β
? Select a Provider:
βΈ Layer5
None
-
Selecting Layer5 will open a browser to complete the login and authentication process with Layer5 cloud. On successful authentication, you can close the window and return to the command prompt.
Verify that an
auth.jsonfile was created in the.mesheryfolder in your home directory.ls -l $HOME/.meshery/ total 12 -rw-rw-r-- 1 ubuntu ubuntu 39 Dec 21 06:13 auth.json -rw-rw-r-- 1 ubuntu ubuntu 260 Dec 21 06:04 config.yaml -rw-rw-r-- 1 ubuntu ubuntu 988 Dec 21 06:04 meshery.yamlThe need for authentication to
Layer5provider is to save your environment setup while also having persistent/steady sessions and to be able to retrieve performance test results. -
Selecting None will create an empty
auth.jsonfile. All your work remains local and ephemeral.
If mesheryctl is running in a system that does not have a browser, you can download an auth token file from your Layer5 cloud account and copy it into the .meshery folder in your home directory. The following steps show how you can generate and download a token:
-
Navigate to https://cloud.layer5.io/security/tokens and sign-in. Ensure you are in the right organization and click Create.
-
Provide a token name and purpose. Click Create to generate.
-
Click the Download icon to download the
auth.jsonfile.
Then run mesheryctl system check to ensure you do not see an authentication error.
For an exhaustive list of mesheryctl commands and syntax, visit mesheryctl Command Reference.
Recent Discussions with "mesheryctl" Tag
- May 25 | Pairing up with a Meshmate to gacefully start contributing to Meshery and its project ecosystem
- Apr 30 | [Development Meeting] Contributing to Meshery CLI - April 30, 2025
- Apr 30 | Meshery Development Meeting | April 30th, 2025
- Apr 17 | [Newcomersβ Meeting] End-to-End Testing in Meshery CLI using BATs β April 17, 2025
- Mar 28 | unable to lint mesheryctl
- Feb 19 | Mesheryctl system login problem
- Feb 06 | Error while launching the Meshery Dashboard
- Dec 16 | Can't find the file path for meshery designs
- Oct 31 | `pattern import` - Access to this resource is unauthorized
- Oct 24 | `mesheryctl adapter validate` "Error: required flag(s) "spec" not set"


