How Can I Integrate TOTP into My Bash Script for SSH Access?

0
29
Asked By CuriousCoder42 On

I'm working on a project where I need to enhance server access security by using Time-based One-Time Passwords (TOTP). Currently, I'm using a Telegram bot to share an SSH key for user access, but I want to replace this with a TOTP solution. My goal is to have users authenticate their access through Google Authenticator or a similar app. Does Google provide an API for this? If not, what tools can I use to generate TOTP and connect it to my Bash script on the server? How can I ensure that the OTP gets sent through the Telegram bot to grant access?

3 Answers

Answered By SecureShellsmith On

I'm not sure how TOTP ties into your Bash script. Is your script running on the server or client side? It’s important to clarify this, as TOTP would typically apply to the server-side authentication process.

Answered By KeyGuy101 On

Typically, users should only share the public half of their key pair for access. I'm curious about why you're keen on implementing TOTP... It seems like a lot of extra work for something that might not be necessary.

Answered By TechWhiz99 On

There are plenty of resources out there detailing how to integrate Google Authenticator as an additional security factor for SSHD. Check out this guide: [https://goteleport.com/blog/ssh-2fa-tutorial/](https://goteleport.com/blog/ssh-2fa-tutorial/) for some step-by-step instructions.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.