1

Title says it all. I followed this guide to the letter: https://linuxize.com/post/how-to-enable-ssh-on-ubuntu-20-04/ However at the end I was unable to ssh to ubuntu - I get permission denied (publickey). So I went into my sshd_config and modified the following: PermitRootLogin yes PubkeyAuthentication no PasswordAuthentication yes PermitEmptyPasswords no

everything else I left defaulted from a fresh install of ssh server. However, I still cannot log in via ssh, as I get Permission denied (publickey). I find this odd, considering I have explicitly disabled public key authentication. I even tried using the following ssh command: ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no myuser@myserver

However I still get the same result. What on earth am I missing? This seems like it should work. This is in ubuntu 20.04

  • 1
    I just realized.....I can ssh via the IP address of my server and it works fine. However, if I attempt using the hostname, this issue happens. – Rick D Jun 22 at 23:45
  • Ok this keeps getting weirder...when I try to ping it, I get this: a23-202-231-168.deploy.static.akamaitechnologies.com which is NOT my device at all. What is this? Why does it have the same name as my hostname? I am using sambashare as the hostname as I am using it primarily as a samba server - is this a common host? – Rick D Jun 22 at 23:54
  • You better tell us some more about your local area network. As far as I can determine 23.202.231.168 is a23-202-231-168.deploy.static.akamaitechnologies.com. – Doug Smythies Jun 23 at 0:32
  • I don't have a clue what that is. However, I did find something interesting. I was attempting this from a terminal in WSL. On a hunch I downloaded putty and tried to ssh in via the hostname from that, and it worked fine! So something is screwy with WSL. I went into the /etc/hosts file and manually added my server/IP (as the IP is static in my network) and now I can ssh using hostname from my WSL terminal. I have no idea what is going on though. – Rick D Jun 23 at 1:47
  • I can only assume WSL was using some external DNS (Domain Name Service) and got the real answer for something you also seem to use as a local name. – Doug Smythies Jun 23 at 2:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.