Repository

Looks good to me!

User Tools

Site Tools


kb:intranet:platforms:ubuntu:installserver

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
kb:intranet:platforms:ubuntu:installserver [3 months ago ( 3 December 2024)] – [Others] justinkb:intranet:platforms:ubuntu:installserver [3 weeks ago (21 February 2025)] (current) – [Private/public key pair generation] justin
Line 147: Line 147:
  
 Keys can be configured to be auto-added using ''AddKeysToAgent confirm'' as of OpenSSH 7.2. Keys can be configured to be auto-added using ''AddKeysToAgent confirm'' as of OpenSSH 7.2.
 +
 +++++
 +
 +++++ Using .bashrc for ssh-agent |
 +
 +Copied from [[https://unix.stackexchange.com/a/534822|SO]]. Using a fixed socket will avoid spinning up extra agents, by checking if the socket is already open. This will have a persistent ssh-agent, so key lifetime is a must.
 +
 +<code bash>
 +# set SSH_AUTH_SOCK env var to a fixed value
 +export SSH_AUTH_SOCK=~/.ssh/ssh-agent.sock
 +
 +# test whether $SSH_AUTH_SOCK is valid
 +ssh-add -l 2>/dev/null >/dev/null
 +
 +# if not valid, then start ssh-agent using $SSH_AUTH_SOCK
 +[ $? -ge 2 ] && ssh-agent -a "$SSH_AUTH_SOCK" >/dev/null
 +</code>
 +
  
 ++++ ++++
kb/intranet/platforms/ubuntu/installserver.txt · Last modified: 3 weeks ago (21 February 2025) by justin