-
Notifications
You must be signed in to change notification settings - Fork 3
/
ssh.yml
executable file
·44 lines (41 loc) · 1.4 KB
/
ssh.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env ansible-playbook
---
- hosts: pladd-laptop
tasks:
- name: disable_sshd.service
service:
name: sshd.service
state: stopped
enabled: false
- name: enable_sshd.socket
service:
name: sshd.socket
state: started
enabled: true
- name: ssh_config
blockinfile:
path: /home/pladd/.ssh/config
create: yes
owner: pladd
group: pladd
mode: u=rw,go=-
block: |
Host github.com
HostName github.com
User laddp
IdentityFile ~/.ssh/id_rsa
### from https://source.redhat.com/groups/public/itmarketing/it_marketing_wiki/ssh_bastion_config_2018_edition
Host *
Compression yes
ControlMaster auto
#ControlPath ~/.cache/ssh/%C.sock # Only enable this if you understand what it does
ControlPersist 4h
ServerAliveInterval 300
ServerAliveCountMax 600
GSSAPIDelegateCredentials yes
GSSAPIAuthentication yes
ForwardAgent no
ForwardX11 no
ForwardX11Trusted no
Include /etc/crypto-policies/back-ends/openssh.config
...