-
Notifications
You must be signed in to change notification settings - Fork 10
/
keywords.py
122 lines (119 loc) · 3.74 KB
/
keywords.py
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
def yes_or_no(value: str) -> bool:
"""Convert 'yes' or 'no' to True or False
Args:
value (str): The string containing 'yes' or 'no'
Returns:
bool: True if value is 'yes', False if value is 'no'
"""
if value is None:
return
if value.lower() not in ('yes', 'no'):
raise TypeError("Yes or No is required")
convert = {
"yes": True,
"no": False,
True: "yes",
False: "no",
}
return convert[value]
Keywords = [
("HostName", str),
("User", str),
("Port", int),
("IdentityFile", str),
("AddressFamily", str), # any, inet, inet6
("BatchMode", str),
("BindAddress", str),
("ChallengeResponseAuthentication", str), # yes, no
("CheckHostIP", str), # yes, no
("Cipher", str),
("Ciphers", str),
("ClearAllForwardings", str), # yes, no
("Compression", str), # yes, no
("CompressionLevel", int), # 1 to 9
("ConnectionAttempts", int), # default: 1
("ConnectTimeout", int),
("ControlMaster", str), # yes, no
("ControlPath", str),
("DynamicForward", str), # [bind_address:]port, [bind_adderss/]port
("EnableSSHKeysign", str), # yes, no
("EscapeChar", str), # default: '~'
("ExitOnForwardFailure", str), # yes, no
("ForwardAgent", str), # yes, no
("ForwardX11", str), # yes, no
("ForwardX11Trusted", str), # yes, no
("GatewayPorts", str), # yes, no
("GlobalKnownHostsFile", str), # yes, no
("GSSAPIAuthentication", str), # yes, no
("LocalCommand", str),
("LocalForward", str),
("LogLevel", str),
("ProxyCommand", str),
("ProxyJump", str),
("Match", str),
("AddKeysToAgent", str),
("BindInterface", str),
("CanonicalizeHostname", str), # yes, no
("CanonicalizeMaxDots", int),
("CanonicalDomains", str),
("CanonicalizePermittedCNAMEs", str),
("CanonicalizeFallbackLocal", str),
("IdentityAgent", str),
("PreferredAuthentications", str),
("ServerAliveInterval", int),
("ServerAliveCountMax", int),
("UsePrivilegedPort", str), # yes, no
("TCPKeepAlive", str), # yes, no
("Include", str),
("IPQoS", str),
("GlobalKnownHostsFile", str),
("UserKnownHostsFile", str),
("GSSAPIDelegateCredentials", str),
("PKCS11Provider", str),
("XAuthLocation", str),
("PasswordAuthentication", yes_or_no), # default: yes
("KbdInteractiveAuthentication", str),
("KbdInteractiveDevices", str),
("PubkeyAuthentication", str),
("HostbasedAuthentication", str),
("IdentitiesOnly", yes_or_no), # default: no
("CertificateFile", str),
("HostKeyAlias", str),
("MACs", str),
("RemoteForward", str),
("PermitRemoteOpen", str),
("StrictHostKeyChecking", yes_or_no),
("NumberOfPasswordPrompts", str),
("SyslogFacility", str),
("LogVerbose", str),
("HostKeyAlgorithms", str),
("CASignatureAlgorithms", str),
("VerifyHostKeyDNS", str),
("NoHostAuthenticationForLocalhost", str),
("RekeyLimit", str),
("SendEnv", str),
("SetEnv", str),
("ControlPersist", str),
("HashKnownHosts", str),
("Tunnel", str),
("TunnelDevice", str),
("PermitLocalCommand", str),
("RemoteCommand", str),
("VisualHostKey", str),
("KexAlgorithms", str),
("RequestTTY", str),
("SessionType", str),
("StdinNull", str),
("ForkAfterAuthentication", str),
("ProxyUseFdpass", str),
("StreamLocalBindMask", str),
("StreamLocalBindUnlink", str),
("RevokedHostKeys", str),
("FingerprintHash", str), # md5 or sha256
("UpdateHostKeys", str),
("HostbasedAcceptedAlgorithms", str),
("PubkeyAcceptedAlgorithms", str),
("IgnoreUnknown", str),
("SecurityKeyProvider", str),
("KnownHostsCommand", str),
]