From 7032c200628873fc51b8b16330e9b36f960a454d Mon Sep 17 00:00:00 2001 From: Frederik Vanrenterghem Date: Fri, 8 Nov 2019 20:36:13 +0800 Subject: [PATCH] Use gpg-agent for ssh too. --- {gnupg => GnuPG}/.gnupg/gpg.conf | 0 GnuPG/.gnupg/sshcontrol | 10 +++++++++ GnuPG/.pam_environment | 2 ++ bash/.bashrc | 12 ++++++++++ ssh/.ssh/config | 38 ++++++++++++++++++++++++++++++++ 5 files changed, 62 insertions(+) rename {gnupg => GnuPG}/.gnupg/gpg.conf (100%) create mode 100644 GnuPG/.gnupg/sshcontrol create mode 100644 GnuPG/.pam_environment create mode 100644 bash/.bashrc create mode 100644 ssh/.ssh/config diff --git a/gnupg/.gnupg/gpg.conf b/GnuPG/.gnupg/gpg.conf similarity index 100% rename from gnupg/.gnupg/gpg.conf rename to GnuPG/.gnupg/gpg.conf diff --git a/GnuPG/.gnupg/sshcontrol b/GnuPG/.gnupg/sshcontrol new file mode 100644 index 0000000..77f2878 --- /dev/null +++ b/GnuPG/.gnupg/sshcontrol @@ -0,0 +1,10 @@ +B0D26D6EE5362E7BC03939A4CF58C9DF0B3969EB +# RSA key added on: 2019-11-08 20:10:15 +# Fingerprints: MD5:ac:80:cb:7f:43:8d:c4:9a:ad:bc:f7:b1:a9:3d:11:37 +# SHA256:0vbyxYPlOv7jqj9s3/E0uCGP8QBWapDVRwEsvz88bVw +AD77C545860351A8542BA195ED47C403BD712F13 0 +# RSA key added on: 2019-11-08 20:15:27 +# Fingerprints: MD5:d3:0a:86:90:d8:43:54:e1:93:06:e4:1d:2d:cb:d3:d1 +# SHA256:/0VwKpJGWWOFOOliUGG+jP2Y274Xshg4Wr4OJwKdOAs +59FEF7AF009E63BC559505898BEF9A50C2B7B3F2 0 + diff --git a/GnuPG/.pam_environment b/GnuPG/.pam_environment new file mode 100644 index 0000000..b55fba7 --- /dev/null +++ b/GnuPG/.pam_environment @@ -0,0 +1,2 @@ +SSH_AGENT_PID DEFAULT= +SSH_AUTH_SOCK DEFAULT="${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh" diff --git a/bash/.bashrc b/bash/.bashrc new file mode 100644 index 0000000..0aa3228 --- /dev/null +++ b/bash/.bashrc @@ -0,0 +1,12 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +alias ls='ls --color=auto' +PS1='[\u@\h \W]\$ ' + +export GPG_TTY=$(tty) +gpg-connect-agent updatestartuptty /bye >/dev/null diff --git a/ssh/.ssh/config b/ssh/.ssh/config new file mode 100644 index 0000000..9388e19 --- /dev/null +++ b/ssh/.ssh/config @@ -0,0 +1,38 @@ +AddKeysToAgent yes + +Host niihau.vanrenterghem.biz + User frederik + Hostname niihau.vanrenterghem.biz + PreferredAuthentications publickey + IdentityFile /home/frederik/.ssh/niihau/id_rsa + ForwardAgent yes +Host laysan.vanrenterghem.biz + User frederik + Hostname laysan.vanrenterghem.biz + PreferredAuthentications publickey + IdentityFile /home/frederik/.ssh/niihau/id_rsa +Host niihau.onion + HostName hmpbd2zu6pwhplxb.onion + Port 22 + User frederik + PreferredAuthentications publickey + IdentityFile /home/frederik/.ssh/id_rsa +Host laysan.onion + HostName a23g4um577l6pxt5.onion + Port 22 + User frederik + PreferredAuthentications publickey + IdentityFile /home/frederik/.ssh/id_rsa +Host A20.onion + HostName d77qthgfqebrzql2.onion + Port 22 + User frederik + PreferredAuthentications publickey + IdentityFile /home/frederik/.ssh/id_rsa +Host *.onion + ProxyCommand nc -xlocalhost:9050 -X5 %h %p + +Host ch-s011.rsync.net + IdentityFile ~/.ssh/borgbackup/key.ch-s011.rsync.net + User 17926 + -- 2.39.5