I installed SSH server and client using the commands in Ubuntu 13.10

sudo apt-get install ssh

But then I am able to connect using my client to any other ssh server on the network by

ssh username@hostname

But when I try connecting ssh-client on my laptop to itself. It says permission denied, Please try again.

$ : ssh shubhang@
shubhang@'s password: 
Permission denied, please try again.

Can someone help me with this.

  • 1
    Does it work if you try ssh shubhang@localhost? Sep 16, 2013 at 12:56

2 Answers 2


In your /etc/ssh/sshd_config

  1. make sure you have the following PasswordAuthentication yes # Default anyway
  2. make sure the users is not in DenyUsers and DenyGroups.

This cloud be cause by various reasons (misconfiguration or permissions), the best way is to start both sshd and ssh client in verbose mode.

For example:


Stop sshd and then run sudo /usr/sbin/sshd -Dd


Connect => ssh user@host -vvv

Look at the debug output and it'll point you to the root cause, most likely.


Instead of ssh try installing openssh, it always works for me.

  • Can you please expand your answer on how to do that? You can edit your answer by clicking the edit link right underneath the text of your answer. Thanks!
    – Alaa Ali
    Sep 18, 2013 at 16:24

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.