diff options
author | Alen <alen@dotfiles.xyz> | 2023-09-14 01:08:16 +0400 |
---|---|---|
committer | Alen <alen@dotfiles.xyz> | 2023-09-14 01:34:12 +0400 |
commit | 95489906e160ed78d25ffe665a46f674ffc8264a (patch) | |
tree | 3a72e38c041a5b889873e2b0b5ab24d244084795 | |
parent | d00c86a97392043d66574b8c903f58c04db301ca (diff) |
Add basic .ssh/config and .ssh/authorized_keys
-rw-r--r-- | .chezmoi.toml.tmpl | 6 | ||||
-rw-r--r-- | private_dot_ssh/authorized_keys.tmpl | 5 | ||||
-rw-r--r-- | private_dot_ssh/private_config.tmpl | 15 | ||||
-rw-r--r-- | private_dot_ssh/private_control/.keep | 0 |
4 files changed, 26 insertions, 0 deletions
diff --git a/.chezmoi.toml.tmpl b/.chezmoi.toml.tmpl index 16c95bb..671e923 100644 --- a/.chezmoi.toml.tmpl +++ b/.chezmoi.toml.tmpl @@ -16,3 +16,9 @@ [data.todo] personalPriority = {{ promptString "personal todo.txt priority words" $defaultUsername | quote }} + +[data.github] + username = {{ promptString "GitHub username" "n/a" | quote }} + +[data.ssh] + user = {{ promptString "SSH default user" $defaultUsername | quote }} diff --git a/private_dot_ssh/authorized_keys.tmpl b/private_dot_ssh/authorized_keys.tmpl new file mode 100644 index 0000000..b0a1bbe --- /dev/null +++ b/private_dot_ssh/authorized_keys.tmpl @@ -0,0 +1,5 @@ +{{- if ne .github.username "n/a" -}} +{{ range gitHubKeys .github.username -}} +{{ .Key }} +{{ end -}} +{{- end -}} diff --git a/private_dot_ssh/private_config.tmpl b/private_dot_ssh/private_config.tmpl new file mode 100644 index 0000000..d166a06 --- /dev/null +++ b/private_dot_ssh/private_config.tmpl @@ -0,0 +1,15 @@ +Host chaos.usbx.me chaos + HostName chaos.usbx.me + Port 22 + User alen1 + +Host * + User {{ .ssh.user }} + Port 22 + IdentitiesOnly yes + ServerAliveCountMax 2147483 + ServerAliveInterval 30 + HashKnownHosts yes + ControlMaster auto + ControlPersist 60m # yes + ControlPath ~/.ssh/control/%h-%C diff --git a/private_dot_ssh/private_control/.keep b/private_dot_ssh/private_control/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/private_dot_ssh/private_control/.keep |