If you want to create magento 2 administrator via command line, then first access the command line via SSH and navigate to magento 2 installed directory’s root and run the following command line.

Syntax:

php bin/magento admin:user:create --admin-user=user-name --admin-password=user-password [email protected] --admin-firstname=user-first-name --admin-lastname=user-last-name 

Example:

 php bin/magento admin:user:create --admin-user=naeem --admin-password=password123 [email protected] --admin-firstname=Muhammad --admin-lastname=Naeem  

Thank you for reading!