https://github.com/oditynet/2fact-sshkey
2fact pam module. Вставляешь флешку,монтируется папку,получает ключ, rules разблокирует экран.
https://github.com/oditynet/2fact-sshkey
2fa 2factor ssh-key
Last synced: 10 months ago
JSON representation
2fact pam module. Вставляешь флешку,монтируется папку,получает ключ, rules разблокирует экран.
- Host: GitHub
- URL: https://github.com/oditynet/2fact-sshkey
- Owner: oditynet
- License: gpl-3.0
- Created: 2023-04-04T14:01:24.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-07T12:33:53.000Z (over 1 year ago)
- Last Synced: 2024-08-07T15:13:02.909Z (over 1 year ago)
- Topics: 2fa, 2factor, ssh-key
- Language: C
- Homepage:
- Size: 33.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is a PAM module for 2fact auth of sshkey on USB
Enter User\password and enter USB with private key.
Your are generate a key with ssh-keygen. Private key copy to USB flash with ext4 FS, public key copy to /root or etc. (edit a code)
```sed
systemcctl start sshd (add :
PubkeyAuthentication yes
PubkeyAcceptedKeyTypes=+ssh-rsa)
cp usb-mount@.service /etc/systemd/system/
cp 35-auth.rules /etc/udev/rules.d/
cp usb-mount.sh /usr/local/bin/
chmod u+x /usr/local/bin/usb-mount.sh
udevadm control --reload-rules
systemctl daemon-reload
make
cp 2fact.so /usr/lib/security
```
add to /etc/pam.d/system-auth "auth requisite 2fact.so"
TODO:
- Do not used a sshd service