Setup SSH MasterSocker and other small improvements

This commit is contained in:
Marko Korhonen 2022-08-29 20:33:59 +03:00
parent e3f197456b
commit 929e4a0bfc
5 changed files with 18 additions and 15 deletions

View file

@ -58,19 +58,16 @@ export MANPAGER="$EDITOR +\"lua require 'pager'\" +Man!"
export SYSTEMD_EDITOR=$EDITOR
export SYSTEMD_PAGER=less
# Use GPG for SSH authentication
export GPG_TTY="$(tty)"
{%@@ if os == "arch" @@%}
# set SSH_AUTH_SOCK if not logging in over SSH
if [ "$SSH_CONNECTION" = "" ]; then
{%@@ if os == "arch" or os == "ubuntu" @@%}
# set SSH_AUTH_SOCK if not logging in over SSH
export GPG_TTY="$(tty)"
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
#gpgconf --launch gpg-agent
gpg-connect-agent updatestartuptty /bye >/dev/null
fi
gpgconf --launch gpg-agent
{%@@ elif os == "termux" @@%}
eval $(okc-ssh-agent)
eval $(okc-ssh-agent)
{%@@ endif @@%}
fi
# Enable grc colorization of supported commands
[[ -s "/etc/grc.zsh" ]] && source /etc/grc.zsh

View file

@ -1,2 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHLUrf0LpumX6XEkPW6Z105sgJMWWOllWy7sxB+lgdUw Marko YubiKey
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEvsd9UtWtqfG+vmx9ByEwQwKJlcelWwZlN4b4WG0al3 backup

View file

@ -1,5 +1,12 @@
Include ~/.ssh/rossum_hosts
host *
IdentitiesOnly yes
IdentityFile ~/.ssh/id_ed25519_yubikey.pub
ControlMaster auto
ControlPersist 10m
ControlPath ~/.ssh/%r@%h:%p.socket
host gitea
HostName korhonen.cc
user git

View file

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHLUrf0LpumX6XEkPW6Z105sgJMWWOllWy7sxB+lgdUw Marko YubiKey