ssh fixings

This commit is contained in:
Daniel Lundin 2023-06-06 12:18:49 +02:00
parent d9039fa3f6
commit a941385823
5 changed files with 18 additions and 8 deletions

View file

@ -0,0 +1 @@
SSH_AUTH_SOCK=${XDG_RUNTIME_DIR}/ssh-agent.socket

View file

@ -0,0 +1,14 @@
[Unit]
Description=SSH key agent
[Service]
Type=simple
Restart=on-failure
Environment=DISPLAY=:0
Environment=WAYLAND_DISPLAY=wayland-0
Environment=SSH_ASKPASS=/usr/bin/ksshaskpass
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
[Install]
WantedBy=default.target

View file

@ -1,4 +1,4 @@
ForwardAgent yes
ForwardAgent no
ServerAliveInterval 15
ServerAliveCountMax 3
ControlMaster auto
@ -19,15 +19,10 @@ PKCS11Provider /usr/lib/pkcs11/libtpm2_pkcs11.so
Host 10.1.100.16
Host dln-dev
Hostname 10.1.100.16
IdentityAgent ${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh
ForwardAgent yes
ForwardX11 no
ExitOnForwardFailure yes
Compression yes
LocalForward 127.0.0.1:3000 127.0.0.1:3000
LocalForward 127.0.0.1:3011 127.0.0.1:3011
LocalForward 127.0.0.1:8000 127.0.0.1:8000
LocalForward 127.0.0.1:8080 127.0.0.1:8080
# RemoteForward ${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent ${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.extra
RemoteForward ${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh ${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh
# RemoteForward ${XDG_RUNTIME_DIR}/gnupg/S.scdaemon ${XDG_RUNTIME_DIR}/gnupg/S.scdaemon

View file

@ -1,3 +1,3 @@
if [[ -S "$SSH_AUTH_SOCK" && ! -h "$SSH_AUTH_SOCK" ]]; then
ln -sf "$SSH_AUTH_SOCK" $HOME/.ssh/ssh_auth_sock;
ln -sf "$SSH_AUTH_SOCK" "${XDG_RUNTIME_DIR}/ssh-agent.sock";
fi

View file

@ -17,7 +17,7 @@ set-option -g mouse on
set -g set-clipboard on
bind-key ] paste-buffer -p
set -g update-environment "BUILDCOMMAND GOPACKAGESDRIVER XAUTHORITY DISPLAY WINDOWID SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION"
set -g update-environment "BUILDCOMMAND GOPACKAGESDRIVER SSH_AUTH_SOCK SSH_CONNECTION"
set -g default-command zsh
set -g history-limit 10000