I accidently changed ssh_config instead of sshd_config on a remote debian machine. Whenever i try to loging, i get

    /etc/ssh/ssh_config: line 55: Bad configuration option: permitrootlogin
    /etc/ssh/ssh_config: terminating, 1 bad configuration options

How can i resolve this issue remotely?

3 Answers 3


To resolve this issue you have to commented out line 55 in /etc/ssh/ssh_config

#PermitRootLogin yes

PermitRootLogin is actually an option which is valid in the /etc/ssh/sshd_config file; not the ssh_config file. The difference is that the sshd_config file controls the SSH server and the ssh_config file controls the client. Therefore, it would indeed be a bad (invalid) config option in the client settings file.


You do not need to do it remotely! Just delete permitrootlogin line from local /etc/ssh/ssh_config file which used during ssh connection to a remote server.


Well, if you can't log into the system, you're going to have to boot in rescue mode, or access it via console, if that is an option.

But ssh_config is the config file that is used by the ssh client, sshd_config is used by the ssh server. If you try to log into the server, that server should be reading sshd_config. Did you change something in the ssh_config file of your local machine?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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