0

I am able to setup ssh key login for root user to my remote system from my local machine. Now I have created another user in my remote system like this,

sudo useradd --system --gid webapps --shell /bin/bash --home /webapps/hello_django hello

So, the name of the new user is hello. Home directory for this user is /webapps/hello_django.

Now I made hello as the owner of the directory, like this sudo chown hello /webapps/hello_django/

I certainly have created a password for the user as well.

Now in my local system I have created another pair of public and private key using ssh-keygen. And added the public key to /webapps/hello_django/.ssh/authorized_keys file in my remote machine. I am still not able to login to my machine using this user hello. For my root user, I followed the same process and it's working perfectly. What am I missing?

2
  • There are few things that you should check. Permissions on home directory, on .ssh directory and on authorized_keys so the user will be able to connect. Then you should also check server log, which should give you some information for rejecting the user. You should mention how you connect with your new user and what error you got.
    – Jakuje
    Jan 3, 2016 at 16:23
  • Thanks. I checked the log and figured out it was a permission issue. Jan 3, 2016 at 16:42

1 Answer 1

0

First thing is checking error log on server, which is usually more verbose then the one from client. It will probably tell you that you have wrong permissions on some way to the authorized_keys. After fixing accordingly, it should start to work for you as expected.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .