-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathsshd_config
113 lines (70 loc) · 3.74 KB
/
sshd_config
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
#
##::[[--- Windows OpenSSH SSHd Config ---]]::##
#===================================================
##----- Global Options -----##
#===================================================
# Please verify to ensure algorithims are supported on your OS:
# Ciphers: # HostKey & KeyTypes
## ssh -Q cipher ## ssh -Q key
# Kex [Key Exchange] # MAC [Message Authentication Code]
## ssh -Q kex ## ssh -Q mac
# Users may need to manually create the PID file:
## cmd /c md "C:\Program Files\OpenSSH\appfiles"
## cmd /c echo > "C:\Program Files\OpenSSH\appfiles\sshd.pid"
# Connection #
#---------------------------------------------------
Port = 22
AddressFamily = inet
ListenAddress = 192.168.1.1
# Encryption #
#---------------------------------------------------
Protocol = 2
AuthorizedKeysFile = "%d\\.ssh\\authorized_keys"
HostKey = __PROGRAMDATA__/ssh/ssh_host_rsa_key
HostKey = __PROGRAMDATA__/ssh/ssh_host_ed25519_key
RekeyLimit = 500M 60m
# Authentication #
#---------------------------------------------------
AllowUsers = user1 user2
ChallengeResponseAuthentication = no
PasswordAuthentication = no
PermitEmptyPasswords = no
StrictModes = yes
PubkeyAuthentication = yes
LoginGraceTime = 30
MaxAuthTries = 3
MaxSessions = 10
MaxStartups = 3:30:10
PermitRootLogin = no
# prohibit-password
# Reliability #
#---------------------------------------------------
ClientAliveCountMax = 3
ClientAliveInterval = 600
TCPKeepAlive = yes
UseDNS = yes
# Security #
#---------------------------------------------------
AllowAgentForwarding = yes
AllowTcpForwarding = yes
GatewayPorts = clientspecified
PermitTunnel = yes
Subsystem sftp = sftp-server.exe
hostkeyagent = \\.\pipe\openssh-ssh-agent
# Logging #
#---------------------------------------------------
SyslogFacility = AUTH
LogLevel = VERBOSE
PidFile = "C:\\Program Files\\OpenSSH\\appfiles\\sshd.pid"
# Environment #
#---------------------------------------------------
##PermitUserRC = yes
# Ciphers and ReKeying #
#---------------------------------------------------
FingerprintHash = sha256
Ciphers = [email protected],aes128-ctr,aes128-cbc,aes192-ctr,aes192-cbc,[email protected],aes256-ctr,aes256-cbc,[email protected]
HostKeyAlgorithms = ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256
HostbasedAcceptedAlgorithms = ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256
KexAlgorithms = [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,[email protected],curve25519-sha256,diffie-hellman-group-exchange-sha256
MACs = [email protected],[email protected],hmac-sha2-256,hmac-sha2-512
PubkeyAcceptedAlgorithms = ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256