My favorite of them is using SSH keys (private/public keys). This is however really advanced in some cases.
You can also use the default username/password strategy.
Or really any way you can imagine that they can prove themselves to be who they say they are.
If you want to build a terminal interface I recommend you look into a module called Blessed.js. Or if you’d like to keep it simple you can look into Inquirer.js.
I really don’t have any tutorials as I learned this myself using the Node.js API docs for their Crypto module. And I recommend against trying to learn it yourself as a beginner, as this is some pretty difficult stuff.
However, if you insist I’m sure you could google something like Node.js public private key authentication