Home > OS >  Bad configuration option (SSH)
Bad configuration option (SSH)

Time:11-09

macbookair@Furqans-MacBook-2021 ~ % ssh -T [email protected] 
/etc/ssh/sshd_config.d/100-macos.conf: line 2: Bad configuration option: usepam
/etc/ssh/sshd_config.d/100-macos.conf: line 3: Bad configuration option: acceptenv
/etc/ssh/sshd_config.d/100-macos.conf: line 4: Bad configuration option: subsystem
/etc/ssh/sshd_config.d/100-macos.conf: terminating, 3 bad configuration options
macbookair@Furqans-MacBook-2021 ~ % sudo nano /etc/ssh/sshd_config

When ever i try "ssh -T [email protected] " OR "ssh root@" OR push my branch it shows me this error

CodePudding user response:

So i got the solution,I completely messed up the ssh_config and sshd_config files... Man pages for sshd_config (the server-side config, which includes the AcceptEnv, AuthorizedKeysFile, Subsystem, and UsePAM keywords) vs ssh_config (the client-side config, which doesn't have any of those -- although it does have some related ones, like SendEnv, SetEnv, and SessionType ).

I took the latest files of ssh_config and sshd_config from github and also updated the config file by entering...

sudo nano ~/.ssh/config

and updated my host settings

CodePudding user response:

This may look similar but there is another issue, files are different ... is there any way to reset my whole ssh folder ?

First, as explained here, you can add any setting you need for sshd_config to a file in /etc/ssh/sshd_config.d/*.conf.

The file 100-macos.conf comes with MacOS Monterey.

Editing that file would likely get reverted upon the next patch, so it is best to leave it alone, and add a new conf file if you need custom settings.

Check if Time Machine is activated to restore the original content of 100-macos.conf (unless you can upgrade your OS, which would reset its content)

  • Related