Bad ssh config Cannot login in

Nirjonadda

Well-Known Member
May 8, 2013
736
27
78
cPanel Access Level
Root Administrator
To avoid SSH timeout issues when connecting from terminal/putty then I have added "ServerAliveInterval 60" to at /etc/ssh/ssh_config. now no more start the SSH server. Also can not login for remove this line. How to remove the line from ssh_config files?

Code:
Waiting for “sshd” to start ……Job for sshd.service failed because the control process exited with error code. See "systemctl status sshd.service" and "journalctl -xe" for details. …failed.

Cpanel::Exception::Services::StartError Service Status

Service Error
(XID cqcfya) The “sshd” service failed to start.

Startup Log
Dec 12 03:50:43 na.nirjonmela.com systemd[1]: Failed to start OpenSSH server daemon.
Dec 12 03:50:43 na.nirjonmela.com systemd[1]: Unit sshd.service entered failed state.
Dec 12 03:50:43 na.nirjonmela.com systemd[1]: sshd.service failed.

Log Messages
Dec 12 03:50:43 na sshd: /etc/ssh/sshd_config: terminating, 1 bad configuration options
Dec 12 03:44:04 na sshd[8496]: pam_unix(sshd:session): session opened for user root by (uid=0)

sshd has failed. Contact your system administrator if the service does not automagically recover.
 

Nirjonadda

Well-Known Member
May 8, 2013
736
27
78
cPanel Access Level
Root Administrator
Try this

Code:
http://$IPADDRESS:2086/scripts2/doautofixer?autofix=safesshrestart
Replace $IPADDRESS with your server's actual IP address.
Do this lot of time but this will do reset
sshd_config files, not ssh_config files. We need fix for files ssh_config.
 

SysSachin

Well-Known Member
Aug 23, 2015
604
48
28
India
cPanel Access Level
Root Administrator
Twitter
Do you have backend console for the server, if you have you can easily login to server and remove the line and restart the server.

If you have got server from hosting provider you can ask them to do this for you.
 

Nirjonadda

Well-Known Member
May 8, 2013
736
27
78
cPanel Access Level
Root Administrator
Do you have backend console for the server, if you have you can easily login to server and remove the line and restart the server.

If you have got server from hosting provider you can ask them to do this for you.
I have VNC login details but how to work with VNC files edit and save?