ssh fixings
This commit is contained in:
parent
d9039fa3f6
commit
a941385823
5 changed files with 18 additions and 8 deletions
1
.config/environment.d/ssh.conf
Normal file
1
.config/environment.d/ssh.conf
Normal file
|
@ -0,0 +1 @@
|
||||||
|
SSH_AUTH_SOCK=${XDG_RUNTIME_DIR}/ssh-agent.socket
|
14
.config/systemd/user/ssh-agent.service
Normal file
14
.config/systemd/user/ssh-agent.service
Normal 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
|
|
@ -1,4 +1,4 @@
|
||||||
ForwardAgent yes
|
ForwardAgent no
|
||||||
ServerAliveInterval 15
|
ServerAliveInterval 15
|
||||||
ServerAliveCountMax 3
|
ServerAliveCountMax 3
|
||||||
ControlMaster auto
|
ControlMaster auto
|
||||||
|
@ -19,15 +19,10 @@ PKCS11Provider /usr/lib/pkcs11/libtpm2_pkcs11.so
|
||||||
Host 10.1.100.16
|
Host 10.1.100.16
|
||||||
Host dln-dev
|
Host dln-dev
|
||||||
Hostname 10.1.100.16
|
Hostname 10.1.100.16
|
||||||
IdentityAgent ${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh
|
|
||||||
ForwardAgent yes
|
ForwardAgent yes
|
||||||
ForwardX11 no
|
|
||||||
ExitOnForwardFailure yes
|
ExitOnForwardFailure yes
|
||||||
Compression yes
|
Compression yes
|
||||||
LocalForward 127.0.0.1:3000 127.0.0.1:3000
|
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:3011 127.0.0.1:3011
|
||||||
LocalForward 127.0.0.1:8000 127.0.0.1:8000
|
LocalForward 127.0.0.1:8000 127.0.0.1:8000
|
||||||
LocalForward 127.0.0.1:8080 127.0.0.1:8080
|
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
|
|
||||||
|
|
2
.ssh/rc
2
.ssh/rc
|
@ -1,3 +1,3 @@
|
||||||
if [[ -S "$SSH_AUTH_SOCK" && ! -h "$SSH_AUTH_SOCK" ]]; then
|
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
|
fi
|
||||||
|
|
|
@ -17,7 +17,7 @@ set-option -g mouse on
|
||||||
set -g set-clipboard on
|
set -g set-clipboard on
|
||||||
bind-key ] paste-buffer -p
|
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 default-command zsh
|
||||||
set -g history-limit 10000
|
set -g history-limit 10000
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue