Raspberry Pi Connection closed while doing remote SSH

Faced an issue of unable to connect remotely to my raspberry pi remotely over ssh. Enabled password based authentication etc in sshd_config file. Still the issue not resolved. Below commands assisted in the resolution of the problem.

sudo rm /etc/ssh/ssh_host_*
sudo dpkg-reconfigure openssh-server
sudo systemctl stop ssh
sudo systemctl start ssh

Source: Raspberry Pi Connection closed SSH – Stack Overflow

About the Author

Yogi

24 years of experience in various layers of software. Primarily experienced in system side software design and development on server management software. Interested in linux development in x86 and arm architecture.