Can't SSH localhost
In the comments it appeared that your OpenSSH server configuration file (/etc/ssh/sshd_config
) is empty. Reinstall the configuration file by purging and reinstalling:
-
Remove the configuration file:
sudo rm /etc/ssh/sshd_config
-
purge:
sudo apt-get purge openssh-server
-
install:
sudo apt-get install openssh-server
This may not work, instead, then follow: How can I restore configuration files?