Unable to SSH with putty for newly created user. Ubuntu 13.10

I need to give a new user access to make changes to files in a folder under /var/www I created the user sudo adduser newuser I then tried to add the user to the www-data group so that they can modify the files owned by www-data.

The user was not able to ssh in at all. So I deleted the user sudo deluser --remove-home newuser and recreated it again but this time did not add it to the group, but this had no effect, i was still unable to ssh with the new user.

I am able to ssh onto the box with another user I created ages ago and probaly set up a public private key however the folders this article Initial Servire setup talks about a .ssh directory which my current user (that can ssh in) does not have.

Is there an easyer way to give a temporary user access to just 1 directory under /var/www and if not, how can I go about finding if I have a public key under my existing user that I need to copy to the new user?

Many Thanks Marc

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

The issue in the end was the way the box was set up, it had an allow users section in the sshdconfig file that only allows ssh via named users, if the user is not on the list, it will not allow it to ssh on to the box at all regardless. This file can be found here: /etc/ssh/sshdconfig

I think this may be the way Digital Ocean configures the Ubuntu OS when setting up a new droplet. I did not know this file even existed and have never modified it previously, all I did was create one user when I setup the droplet and have ssh’ed onto the box with it ever since.

So if you are able to ssh onto your droplet but have no .ssh directory in that user’s home directory and newly created users are denied access to the droplet, see if you don’t have an allow users section in your sshdconfig file!

If you have a public key set up for a user, it will be in that user’s ~/.ssh/authorized_keys file. Try looking again? What command are you using to verify this?