From e446fc080b27c88834962d8c9414a5bf17898d64 Mon Sep 17 00:00:00 2001 From: xyz Date: Fri, 19 Aug 2022 23:05:32 -0700 Subject: ssh config, `AddKeysToAgent yes` should not be under only one `Host` --- home/xyz/.ssh/config | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'home/xyz/.ssh/config') 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 -- cgit v1.2.3-70-g09d2