From c751df31ad82a5a7c34f9c5e849fa68642be2926 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 5 Apr 2021 15:04:27 +0200 Subject: [PATCH] ssh: Add simple ssh configuration module Added configuration module for ssh client. Sets some basic settings and sets a general structure for the ssh folder: ``` .ssh/ |- config |- conf/ |---|- config.ssh |----- hosts.ssh |- keys/ |---|- id_* ------ id_*.pub ``` Config only refers to the files situated in `conf/` directory, while any `hosts.ssh` configuration redirects to the correct keyfiles lying in `keys/`. Actual settings can be configured in `config.ssh` and this file is also committed to versioning, whereas keys and hosts are not. --- ssh/.gitignore | 8 ++++++++ ssh/.ssh/conf/config.ssh | 5 +++++ ssh/.ssh/config | 2 ++ 3 files changed, 15 insertions(+) create mode 100644 ssh/.gitignore create mode 100644 ssh/.ssh/conf/config.ssh create mode 100644 ssh/.ssh/config diff --git a/ssh/.gitignore b/ssh/.gitignore new file mode 100644 index 0000000..71b2bef --- /dev/null +++ b/ssh/.gitignore @@ -0,0 +1,8 @@ +### SSH ### +**/.ssh/id_* +**/.ssh/*_id_* + +**/.ssh/keys/ +**/.ssh/**/hosts.ssh +**/.ssh/known_hosts +**/.ssh/authorized_keys diff --git a/ssh/.ssh/conf/config.ssh b/ssh/.ssh/conf/config.ssh new file mode 100644 index 0000000..1768d6c --- /dev/null +++ b/ssh/.ssh/conf/config.ssh @@ -0,0 +1,5 @@ +# Send a keepalive package every 15 seconds without data +ServerAliveInterval 15 + +# conserve some bandwidth at the cost of processing power +Compression yes diff --git a/ssh/.ssh/config b/ssh/.ssh/config new file mode 100644 index 0000000..2d4b429 --- /dev/null +++ b/ssh/.ssh/config @@ -0,0 +1,2 @@ +Include ~/.ssh/conf/config.ssh +Include ~/.ssh/conf/hosts.ssh