User Tools

Site Tools


networking:ssh:multiple-systemd-ssh-agents

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
networking:ssh:multiple-systemd-ssh-agents [2022/05/06 21:57] – [Naming the ssh-agent-services] chucknetworking:ssh:multiple-systemd-ssh-agents [2022/05/06 22:00] (current) – [Manage the ssh-agent service] chuck
Line 57: Line 57:
  
 =====Administration===== =====Administration=====
-====Naming the ssh-agent services==== 
-  * What name to use for each service will also be the name of the socket. 
-  * For example, if we named one ''%%foo%%'' and another ''%%bar%%'':<code bash> 
-systemctl --user enable --now [email protected] 
-systemctl --user enable --now [email protected] 
-</code> 
-  * We would have two new socket files:<code bash> 
-$XDG_RUNTIME_DIR/foo-service.socket 
-$XDG_RUNTIME_DIR/bar-service.socket 
-</code> 
  
----- 
 ====Manage the ssh-agent service==== ====Manage the ssh-agent service====
   * Start and enable the agent as your regular user (and similar for the other agent(s)):<code bash>   * Start and enable the agent as your regular user (and similar for the other agent(s)):<code bash>
Line 80: Line 69:
 </code> </code>
  
-----+===Naming the ssh-agent services=== 
 +  * Whatever name you use for each service will be included in the name of the agent's socket. 
 +  * For example, if we named one ''%%foo%%'' and another ''%%bar%%'':<code bash> 
 +systemctl --user enable --now [email protected] 
 +systemctl --user enable --now [email protected] 
 +</code> 
 +  * We would have two new socket files:<code bash> 
 +"$XDG_RUNTIME_DIR/foo-agent.socket" 
 +"$XDG_RUNTIME_DIR/bar-agent.socket" 
 +</code>
  
 +----
 =====Set a default ssh-agent===== =====Set a default ssh-agent=====
   * Create an environment variable in your preferred startup file (eg ''%%~/.profile%%'', ''%%~/.bash_profile%%'', etc):<code bash>   * Create an environment variable in your preferred startup file (eg ''%%~/.profile%%'', ''%%~/.bash_profile%%'', etc):<code bash>
networking/ssh/multiple-systemd-ssh-agents.1651888667.txt.gz · Last modified: 2022/05/06 21:57 by chuck