-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1073148
commit 54233ca
Showing
6 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# openssh_server | ||
|
||
Install the OpenSSH client. | ||
|
||
## Links | ||
|
||
- [OpenSSH](https://www.openssh.com/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
- name: Install | ||
ansible.builtin.package: | ||
name: "openssh-client" | ||
state: "present" | ||
become: true | ||
|
||
- name: Remove unnecessary files | ||
ansible.builtin.file: | ||
path: "/etc/ssh/ssh_config.d" | ||
state: "absent" | ||
become: true | ||
|
||
- name: Configure | ||
ansible.builtin.template: | ||
src: "{{ item }}.j2" | ||
dest: "/{{ item }}" | ||
owner: "root" | ||
group: "root" | ||
mode: "0644" | ||
loop: | ||
- "etc/ssh/ssh_config" | ||
become: true |
34 changes: 34 additions & 0 deletions
34
.ansible/roles/openssh_client/templates/etc/ssh/ssh_config.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# {{ ansible_managed }} | ||
|
||
# See https://man.openbsd.org/ssh_config. | ||
|
||
# Sane (overridable) default for all users. | ||
Host * | ||
IdentityFile ~/.ssh/id_ed25519 | ||
IdentityFile ~/.ssh/id_ecdsa | ||
IdentityFile ~/.ssh/id_rsa | ||
|
||
# Authentication | ||
HostbasedAuthentication no | ||
PasswordAuthentication no | ||
GSSAPIAuthentication no | ||
ChallengeResponseAuthentication no | ||
|
||
# Ciphers and algorithms, see https://infosec.mozilla.org/guidelines/openssh#modern. | ||
HostKeyAlgorithms [email protected],[email protected],ssh-ed25519,ssh-rsa,[email protected],[email protected],[email protected],ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256 | ||
KexAlgorithms [email protected],ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256 | ||
Ciphers [email protected],[email protected],[email protected],aes256-ctr,aes192-ctr,aes128-ctr | ||
MACs [email protected],[email protected],[email protected],hmac-sha2-512,hmac-sha2-256,[email protected] | ||
|
||
# Misc | ||
CheckHostIP yes | ||
StrictHostKeyChecking ask | ||
HashKnownHosts yes | ||
ForwardAgent no | ||
ForwardX11 no | ||
Tunnel no | ||
PermitLocalCommand no | ||
RekeyLimit 1G 1h | ||
|
||
# Pass locale environment variables | ||
SendEnv LANG LC_* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.ansible/.lock | ||
.idea | ||
.venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
enable-ssh-support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters