uTools-Manuals/docs/linux/ssh-agent.html
2019-04-21 11:50:48 +08:00

21 lines
1.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 id="ssh-agent">ssh-agent</h1>
<p>ssh密钥管理器</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>ssh-agent命令</strong> 是一种控制用来保存公钥身份验证所使用的私钥的程序。ssh-agent在X会话或登录会话之初启动所有其他窗口或程序则以客户端程序的身份启动并加入到ssh-agent程序中。通过使用环境变量可定位代理并在登录到其他使用ssh机器上时使用代理自动进行身份验证。</p>
<p>其实ssh-agent就是一个密钥管理器运行ssh-agent以后使用ssh-add将私钥交给ssh-agent保管其他程序需要身份验证的时候可以将验证申请交给ssh-agent来完成整个认证过程。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">ssh-agent [-c | -s] [-d] [-a bind_address] [-t life] [command [arg ...]]
ssh-agent [-c | -s] -k</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-a bind_addressbind the agent to the UNIX-domain socket bind_address.
-c生成C-shell风格的命令输出。
-d调试模式。
-k把ssh-agent进程杀掉。
-s生成Bourne shell 风格的命令输出。
-t life设置默认值添加到代理人的身份最大寿命。</code></pre>
<h3 id="实例">实例</h3>
<p>运行ssh-agent</p>
<pre><code class="language-bash">ssh-agent</code></pre>
<p>运行ssh-agent它会打印出来它使用的环境和变量。</p>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->