fernandomiguel / sshremotekeys Goto Github PK
View Code? Open in Web Editor NEWManaging SSH keys remotely to control access to hosts
License: MIT License
Managing SSH keys remotely to control access to hosts
License: MIT License
I'm not aware of average key rotation time of the user this package is written for, but I would consider acceptable to cache my keys for, let's say, 5 minutes, without compromizing security in case of key revocation.
Back from easter vacation I can PR a change, if you haven't written something yet.
since AuthorizedKeysCommand runs as nobody, the key cache dir can't be $home.
sudo -Hu nobody /usr/local/bin/userkeys.sh
/nonexistent/.ssh/authorized_keys_cache
/usr/local/bin/userkeys.sh: 20: /usr/local/bin/userkeys.sh: cannot create /nonexistent/.ssh/authorized_keys_cache: Directory nonexistent
It seems your script hardcode the username USER
, and that seems quite dangerous given you don't really state it in the docs that you should absolutely customize it.
I guess there is a better solution, which is to use the first argument passed to the script when sshd invokes the command:
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. Argu‐
ments to AuthorizedKeysCommand accept the tokens described in the TOKENS section. If no
arguments are specified then the username of the target user is used.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.