Issue: /etc/ssh/ssh_config: Bad configuration option: permitrootlogin

Issue: /etc/ssh/ssh_config: Bad configuration option: permitrootlogin

Symptom:
[devuser@linuxvm01 docker]$ ssh devuser@linuxvm02
/etc/ssh/ssh_config: line 26: Bad configuration option: permitrootlogin
/etc/ssh/ssh_config: terminating, 1 bad configuration options

Cause:
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:
To resolve this issue you have to commented out line in /etc/ssh/ssh_config
[root@linuxvm01 ~]# vi /etc/ssh/ssh_config
# PermitRootLogin yes

https://serverfault.com/questions/785290/bad-ssh-config-on-remote-server-cannot-login-in/785297

Leave a Reply

Your email address will not be published. Required fields are marked *