-
Notifications
You must be signed in to change notification settings - Fork 1
/
Agent.txt
36 lines (26 loc) · 1004 Bytes
/
Agent.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.4
Creation-Date: 2016-11-23T12:13:50+01:00
====== Agent ======
Created onsdag 23 november 2016
**An SSH agent will cache your private-key, so it can be provided to other SSH clients (Git etc). **
//ssh-agent//** is the default agent included with OpenSSH.**
**# Zsh!**
**# There is a plugin in OMZ, that allows you to easily run a SSH-agent at startup. See **Zsh**.**
===== Bash =====
**# Below is Bash specific - Zsh has a SSH agent plugin (or is it Oh-My-Zsh? Who cares)**
== Run the agent ==
$ eval $(ssh-agent)
== Add private key to agent ==
$ ssh-add ~/.ssh///<private-key>//
== To start the agent automatically ==
**# Add the following to your **//~/.bashrc//** file. **
**#** **This will also make sure, that only one instance of ssh-agent is running.**
{{{code: lang="texinfo" linenumbers="True"
if ! pgrep -u $USER ssh-agent > /dev/null; then
ssh-agent > ~/.ssh-agent
fi
if "$SSH_AGENT_PID" == "" ; then
eval $(<~/.ssh-agent)
fi
}}}