In this video, we look at how a JWT based auth enables sfdx to get authorized to your salesforce instance. Also we will see how a self signed certificate can be generated using openssl.
https://salesforcerealm.com/2020/03/07/authenticate-sfdx-using-jwt/