Hello! DreamCompute newbie here
I recently launched a Debian 8 instance where I want to setup a web server. So far everything works fine, and I wanted to add my own user. I proceeded with:
adduser my-user adduser my-user sudo
It seems to work, but when I ssh my-user@IP it asks for my password. Same when I use sudo. Why is that so? Shouldn’t it go directly, since it is ssh? Two main questions then:
How can I configure my user to ssh without password, just like the default user (debian)?
Is there anything else I need to configure to have my user work properly like the default one?
Another user related question: since I installed apache under root user shell, my /var/www/ and all subdirectories went under root:root ownership. Can I just chown them to www-data:www-data? Is it good practice? I guess it would make it work (currently I can’t even write a file with PHP, for example) however it would mean my new user would not be able to write there too. Well, I could add my new user to www-data group then and make the directory writable to group. But again: I’m not sure if this is good practice. So, to be more direct:
Should I use www-data:www-data ownership for my web files?
How can I make my own user able to write on my web folder without making it less secure?
Thank you in advance any comments and suggestions!