TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Automated SSH PKI Solution

1 点作者 cimnine将近 4 年前
We&#x27;re a small company. We have several servers that we access through SSH. We like to centralize SSH access.<p>Current solutions we are aware of:<p><pre><code> - Share the SSH keys, e.g. on a shared filesystem. - Distribute SSH public keys of users with Puppet, Ansible, etc. - https:&#x2F;&#x2F;goteleport.com&#x2F; (a fancy bastion host) </code></pre> What I&#x27;m looking for:<p>A tool, with which an employee requests access to a server and automatically gets a signed ssh key in return which has limited validity. This key is automatically loaded into the ssh-agent. Ideally, the &#x27;~&#x2F;.ssh&#x2F;config&#x27; is adjusted, so that the correct username is used, and &#x27;~&#x2F;.ssh&#x2F;known_hosts&#x27; is updated with the server&#x27;s public key digest.<p>What I imagine from the perspective of the user:<p><pre><code> - &#x27;tool auth&#x27; &gt; Check if authenticated with the central key management server &gt; Otherwise OAuth with my regular SSO (e.g. Google Workspace) - &#x27;tool ssh server0.corp.com&#x27; &gt; Check with the central key management server if the user has permission to access server0.corp.com &gt; If yes, issue a time-constrained certificate (or sign the user&#x27;s local public key, whatever) &gt; Ensure that the server is configured correctly in &#x27;~&#x2F;.ssh&#x2F;config&#x27; &gt; Ensure that the server public key digest is in &#x27;~&#x2F;.ssh&#x2F;known_hosts&#x27; &gt; Add the certificate to ssh-agent - Run the ssh-based command, e.g. &#x27;ssh server0.corp.com&#x27;, &#x27;scp local_file server0.corp.com:remote_file&#x27;, &#x27;ansible-playbook ...&#x27;, &#x27;git pull -pr&#x27; or whatever </code></pre> Does such a system exist? Ideally something that is easy to deploy to a cloud if it would be self-hosted (and in the best case makes use of Azure KV, Google KMS, AWS KMS, Vault, ...) or that is hosted (i.e. offered as a service).<p>From the operator perspective, it should not take more than configuring the PKI in OpenSSH and&#x2F;or maybe install an agent on the server. (But it&#x27;d be great if that would not be necessary (as OpenSSH afaik can already handle PKI) and if the PKI-related tasks were handled through Ansible&#x2F;Puppet&#x2F;etc. or the &#x27;tool&#x27;.)

1 comment

cimnine将近 4 年前
It&#x27;d be a more or less automated version of this (German) article:<p><a href="https:&#x2F;&#x2F;www.fabiblog.de&#x2F;2018&#x2F;08&#x2F;21&#x2F;openssh-certificate-authority-kurzanleitung&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.fabiblog.de&#x2F;2018&#x2F;08&#x2F;21&#x2F;openssh-certificate-autho...</a><p>Google Translate&#x27;d Version:<p><a href="https:&#x2F;&#x2F;translate.google.com&#x2F;translate?sl=de&amp;tl=en&amp;u=https:&#x2F;&#x2F;www.fabiblog.de&#x2F;2018&#x2F;08&#x2F;21&#x2F;openssh-certificate-authority-kurzanleitung&#x2F;" rel="nofollow">https:&#x2F;&#x2F;translate.google.com&#x2F;translate?sl=de&amp;tl=en&amp;u=https:&#x2F;...</a>