Skip to content
This repository was archived by the owner on May 9, 2018. It is now read-only.

Conversation

@DigitalDJ
Copy link

This patch enables a grace period feature in authy-ssh. One can set a grace period (in seconds) per user, that will prevent prompting for two-factor authentication if a successful login using two-factor authentication was completed recently. It also ensures to not grant the grace period unless the user is connecting from the same IP address.

This would also allow easier SFTP (GUI clients) use with authy-ssh. A user may first login to a normal ssh prompt using two-factor authentication. Once completed, if a grace period is set, SFTP will not require two-factor authentication.

One could further extend this patch to use $SSH_ORIGINAL_COMMAND, to limit the processes grace period should apply to. For example, grace time should apply to sftp-server but not an rsync command.

I've tried to keep things as clean as possible without knowing the ins and outs of Bash. So feel free to clean it up, if necessary.

@DigitalDJ
Copy link
Author

Since this initial pull request, I've also added a feature to print out the default sshd MOTD, by checking whether it is either enforced in pam.d or set in /etc/motd.

Also, fixed a bug where SMS request would fail but be matched as a success.

@DigitalDJ
Copy link
Author

DigitalDJ commented Mar 13, 2017

If this is to be merged, I think the URLs in 6e5ff18 needs to be changed as this now points to me repository. Sorry about that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants