Two-factor authentication on your Raspberry Pi🫢

Make the server accessible from the Internet

Hello, friends! Today, I’d like to share what I learned about TOTP. Why i was reading a security blog cybersafesolutions and then I got more concius about the security of my raspberry.

Setup 2F to my raspberry

I have already enabled SSH , then we need to tell the SSH daemon to enable ā€œchallenge-responseā€ passwords. Go ahead and open the SSH config file:

sudo nano /etc/ssh/sshd_config

Enable challenge response by changing ChallengeResponseAuthentication from the default no to yes.

sudo systemctl restart ssh

Install autnticator module in your setup, in my case i installe the Google Authenticator PAM module.

sudo apt install libpam-google-authenticator

And then configure:

google-authenticator

Be careful, Don’t move forward quite yet! Before you do anything else you should copy the emergency codes and put them somewhere safe.

Let check the video i created:

What I Learned

  1. Not only read is enougth tried to apply.
  2. SSH new configuration.

Off topic ⭐

Please take care of them. MaleDogNeutaring

Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy