The current problem is when I try to connect to a ssh server (from a university I am currently attending) with the following (example) command:

ssh -Y root@example.com

Then I get the following error:

Too many recursive configuration includes

Beforehand, I could connect to the server without any problem. However, I tried to enable X11 forwarding to run graphics applications. I did this by using the nano editor:

nano -w /etc/ssh/ssh_config

In the nano editor, I removed "#" from ForwardX11 and also changed "no" to "yes". Afterwards, I saved and closed the nano editor by pressing ctrl + O and ctrl + X respectively. Finally, I tried numerous ways to restart "ssh(d) service" (to be honest, since I am new to nano editor and ubuntu in general, I just followed the different sites that explains how to enable ForwardX11). I have tried using the following commands:

systemctl restart sshd.service
systemctl restart sshd
sudo systemctl restart sshd
sudo systemctl restart ssh
service sshd restart
sudo service ssh restart

When trying to restart sshd (not ssh), I get the following message:

System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down

This could be a seperate problem not relating to the problem stated in this question. However, I just wanted to tell you what I did before I couldn't connect the university's ssh server anymore.

But after I did everything mentioned above, I couldn't connect to the university's server anymore. Again, the error message I receive is:

Too many recursive configuration includes

What have I done wrong? I suspect I did something wrong in the nano editor.

P.S. My current Ubuntu version is 20.04

  • Are you running the systemctl commands on your local computer, or on the remote system? Is your local system WSL? Changes to /etc/ssh/ssh_config shouldn't have affected the ssh server at all (since that's the system-wide ssh client configuration file). Dec 5, 2020 at 13:33
  • Everything I put here above was on my local computer. The changes did affect the ssh client. When I type in ssh localhost on my computer, I got the same message Too many recursive configuration includes. As a ssh client, I cannot connect to the ssh server of my university anymore.
    – EricH
    Dec 5, 2020 at 14:13
  • Also, I think my local system is WSL (sorry, I don't know about this stuff yet, since I am new to Linux)
    – EricH
    Dec 5, 2020 at 14:25
  • To simplify the problem, I tried to enable forwardx11 with nano editor on my local computer and afterwards I cannot connect to remote ssh server anymore.
    – EricH
    Dec 5, 2020 at 14:35
  • OK so if you are using WSL on the local side, forget about systemctl. In any case, the local sshd service (if there even is one) is irrelevant. The change you made shouldn't have broken things in the way you describe - all I can suggest is that you run the ssh command with increased verbosity (ex. ssh -Y -v root@example.com or ssh -Y -vv root@example.com) and see if that narrows down the issue - in particular look at any and all debug lines related to client config files. Dec 5, 2020 at 15:13

1 Answer 1


I (the asker of this question) confirm that this problem has been solved by the user steeldriver (see comments).

When using the following command to enter nano editor (nano -w /etc/ssh/ssh_config), I presumbably accidently removed the hashtag of the line that says Include /etc/ssh/ssh_config.d/*.conf, since I am new to Linux and the controls of the nano editor.

This (probably) caused the saved file (e.g. copy of the modified /etc.ssh.ssh_config) to try to include itself in /etc/ssh/ssh_config.d/*.conf, which then most likely resulted in the error 'Too many recursive configuration includes'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.