OpenSSH key management Part 2分析和总结分析和总结.docxVIP

  • 0
  • 0
  • 约1.54万字
  • 约 8页
  • 2023-04-24 发布于上海
  • 举报

OpenSSH key management Part 2分析和总结分析和总结.docx

Disclaimer : Disclaimer : The original version of this article was first published on IBM developerWorks, and is property of Westtech Information Services. This document is an updated version of the original article, and contains various improvements made by the Gentoo Linux Documentation team. This document is not actively maintained. OpenSSH key management, Part 2 Content: Introducing ssh-agent and keychain Introducing ssh-agent ssh-agent, included with the OpenSSH distribution, is a special program designed to make dealing with RSA and DSA keys both pleasant and secure (see Part 1 of this series for an introduction to RSA and DSA authentication.) ssh-agent, unlike ssh, is a long-running daemon designed for the sole purpose of caching your decrypted private keys. ssh includes built-in support that allows it to communicate with ssh-agent, allowing ssh to acquire your decrypted private keys without prompting you for a password for every single new connection. With ssh-agent you simply use ssh-add to add your private keys to ssh-agents cache. Its a one-time process; after using ssh-add, ssh will grab your private key from ssh-agent, rather than bugging you by prompting for a passphrase. Using ssh-agent Lets take a look at how this whole ssh-agent key caching system works. When ssh-agent starts up, it spits out a few important environment variables before detaching from the shell and continuing to run in the background. Heres some example output generated by ssh-agent when it begins: Code Listing 1.1: Running ssh-agent daemon Code Listing 1.1: Running ssh-agent daemon $ ssh-agent SSH_AUTH_SOCK=/tmp/ssh-XX4LkMJS/agent.26916; export SSH_AUTH_SOCK; SSH_AGENT_PID=26917; export SSH_AGENT_PID; echo Agent pid 26917; As you can see, ssh-agents output is actually a series of bash commands; if executed, these commands would set a couple of environment variables, SSH_AUTH_SOCK and SSH_AGENT_PID. Due to the included export commands, these environment variables would be made avai

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档