Two-Factor Authentication with Telegram Bot for SSH / Shell Login
You have to run the commands as root or add sudo in front.
curl -fsSL https://raw.githubusercontent.com/bensofficial/2FA-SSH-Shell/master/install.sh -o install.sh
bash install.sh
Adding a user:
curl -fsSL https://raw.githubusercontent.com/bensofficial/2FA-SSH-Shell/master/add-user.sh -o add-user.sh
bash add-user.sh
Chat @BotFather
with /newbot
- Open your API:
https://api.telegram.org/bot[HTTP_API_KEY]/getUpdates
- Chat your Telegram Bot
- Copy your
Chat ID
- Download
shell2FA
source - Change configuration
API KEY
&Chat ID
&URGENT_KEY
on "shell2FA" source - Move
shell2FA
to/bin/
(mv shell2FA /bin/
) chmod +x /bin/shell2FA
- Add
/bin/shell2FA
to/etc/shells