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:

  1. Remove the configuration file:

    sudo rm /etc/ssh/sshd_config
    
  2. purge:

    sudo apt-get purge openssh-server
    
  3. install:

    sudo apt-get install openssh-server
    

This may not work, instead, then follow: How can I restore configuration files?