Bad ssh config on remote server. Cannot login in

Solution 1:

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.

Solution 2:

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.

Solution 3:

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?