Skip to content

A Python based SSH 2-Factor-Authentication script using Time-based One-Time-Passwords.

License

Notifications You must be signed in to change notification settings

kerk12/ssh_totp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Python based 2FA Time-based One Time Password script for authenticating in SSH.

Developed by Kyriakos Giannakis ([email protected]).

Install:
  1. git clone ...
  2. Install the requirements: $ sudo pip install -r requirements.txt
  3. Run the install script as root: $ sudo ./setup.sh
  4. Restart the SSH service: $ sudo service ssh restart
  5. Now each user needs to enable 2FA on his own account, by issuing: $ sshtotp --enable. When the command is run, a base32 Secret Key will be generated and saved in HOME/.totpKey. This needs to be copied onto a 2FA mobile app such as Google Authenticator or FreeOTP. Keep this key secret.

Whenever a user tries to log in, a prompt to enter a One Time Password will appear.

Note: The time on both the server and the mobile device needs to be in sync. We recommend using NTP for syncing the time.

Open Source Licences:

PyOTP. Copyright (C) 2011-2016 Mark Percival [email protected], Nathan Reynolds [email protected], and PyOTP contributors.

About

A Python based SSH 2-Factor-Authentication script using Time-based One-Time-Passwords.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published