Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/farinap5/sshpkm
SSH public key and access manager.
https://github.com/farinap5/sshpkm
permission-manager ssh ssh-key ssh-server
Last synced: 2 months ago
JSON representation
SSH public key and access manager.
- Host: GitHub
- URL: https://github.com/farinap5/sshpkm
- Owner: farinap5
- Created: 2022-06-21T20:38:26.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-14T17:02:14.000Z (over 2 years ago)
- Last Synced: 2024-06-21T02:17:45.722Z (7 months ago)
- Topics: permission-manager, ssh, ssh-key, ssh-server
- Language: Go
- Homepage:
- Size: 47.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SSHPKM
![](img/diagram.png)
Documentation
### Managing User
Creating user
```
create user test
```### Managing Server Access
Create host
```
create host adminVM
```## Configure SSH
[SSH Documentation](https://man7.org/linux/man-pages/man5/sshd_config.5.html)
```
AuthorizedKeysCommand
Specifies a program to be used to look up the user's public
keys. The program must be owned by root, not writable by
group or others and specified by an absolute path.
Arguments to AuthorizedKeysCommand accept the tokens
described in the TOKENS section. If no arguments are
specified then the username of the target user is used.The program should produce on standard output zero or more
lines of authorized_keys output (see AUTHORIZED_KEYS in
sshd(8)). AuthorizedKeysCommand is tried after the usual
AuthorizedKeysFile files and will not be executed if a
matching key is found there. By default, no
AuthorizedKeysCommand is run.
```Use the command `AuthorizedKeysCommand` to hook the SSH public key, it must call a script that will request the key in SSHPKM service.
`vim /etc/ssh/sshd_config`:
```
AuthorizedKeysCommand /bin/getkey
````vim /bin/getkey`:
```
#!/bin/bash
curl https://:/ curl -H "SSH-Host: adminVM" -H "SSH-User: teste"
```