Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
13
rated 0 times [  13] [ 0]  / answers: 1 / hits: 12038  / 2 Years ago, sat, july 23, 2022, 9:03:05

I've accidentally changed something in the /etc/ssh/sshd_config file and now sshd does not start.


I know I should have had a backup before editing it but it is too late now.


Can someone please show me the default content of the sshd_config file?


Or is there anywhere I can get it?


More From » 20.04

 Answers
0

There should be a copy of the default config file at


/usr/share/openssh/sshd_config

(in fact, that's where the original /etc/ssh/sshd_config file gets copied from, by the openssh-server package's postinstall script). You can copy that, or use diff to review what you changed:


$ diff /usr/share/openssh/sshd_config /etc/ssh/sshd_config
122a123,125
>
> #Match Address *,!192.168.1.0/24
> # ForceCommand internal-sftp

[#1565] Monday, July 25, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
calronze

Total Points: 0
Total Questions: 110
Total Answers: 112

Location: Belarus
Member since Thu, Aug 11, 2022
2 Years ago
calronze questions
;