Update SSH config to automatically add keys to agent.
Update ZSH config to automatically start the SSH agent.
This commit is contained in:
parent
194c9d6982
commit
7ed3d3dcc8
3 changed files with 19 additions and 1 deletions
|
|
@ -1,3 +1,11 @@
|
||||||
|
#
|
||||||
|
AddKeysToAgent yes
|
||||||
|
UseKeychain yes
|
||||||
|
|
||||||
|
Host localhost
|
||||||
|
UserKnownHostsFile /dev/null
|
||||||
|
StrictHostKeyChecking no
|
||||||
|
|
||||||
## --- Jupiter ---
|
## --- Jupiter ---
|
||||||
# -- Physical servers --
|
# -- Physical servers --
|
||||||
Host jupiter-thebe-local
|
Host jupiter-thebe-local
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
# If you come from bash you might have to change your $PATH.
|
# If you come from bash you might have to change your $PATH.
|
||||||
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
||||||
|
export PATH="${PATH}:${HOME}/.local/bin"
|
||||||
|
|
||||||
# Path to your oh-my-zsh installation.
|
# Path to your oh-my-zsh installation.
|
||||||
export ZSH="$HOME/.oh-my-zsh"
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/ssh-agent.socket"
|
if [[ -z "${SSH_CONNECTION}" ]]; then
|
||||||
|
if ! pgrep -u "$USER" ssh-agent >/dev/null; then
|
||||||
|
ssh-agent > "$TMPDIR/ssh-agent.env"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -f "${SSH_AUTH_SOCK}" ]]; then
|
||||||
|
source "$TMPDIR/ssh-agent.env" >/dev/null
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue