summaryrefslogtreecommitdiff
path: root/home/xyz/.ssh
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2022-08-19 23:05:32 -0700
committerxyz <gky44px1999@gmail.com>2022-08-19 23:05:32 -0700
commite446fc080b27c88834962d8c9414a5bf17898d64 (patch)
treecf9e5f7014b12512c40a47fcbc51a6dfcadbfc40 /home/xyz/.ssh
parent20d2c42c3284bc04ea95906f2178c1ca66b94c76 (diff)
ssh config, `AddKeysToAgent yes` should not be under only one `Host`
Diffstat (limited to 'home/xyz/.ssh')
-rw-r--r--home/xyz/.ssh/config8
1 files changed, 6 insertions, 2 deletions
diff --git a/home/xyz/.ssh/config b/home/xyz/.ssh/config
index cd1dd2c3..5dcab82d 100644
--- a/home/xyz/.ssh/config
+++ b/home/xyz/.ssh/config
@@ -1,3 +1,9 @@
+# be careful not to put this under `HOST xxx`, else only when ssh to that host will add keys to agent
+# another approach is to put it under `HOST *`
+# https://unix.stackexchange.com/a/577490/459013
+AddKeysToAgent yes
+
+# tabs and empty only for readability, without also works, not sure about newline
Host studio
HostName xyzstudio.local
@@ -15,5 +21,3 @@ Host pi raspberrypi.local
Host phone danctnix.local
HostName danctnix.local
User alarm
-
-AddKeysToAgent yes