I have an Ubuntu 14.04 server, where Apache runs as user www-data. I would like to be able to log into the server via ssh as www-data.
How can I define a password for www-data without breaking the Apache service?
How to add www-data to the list of allowed ssh users?
Edit
I understand from the question that was marked as duplicate, that it is not the most secure solution to give www-data access via ssh, but I need to do it for a different reason at least temporarily.
Here is the reason why I need to log into the server as www-data : I want my webserver to ssh into a remote host without providing a password. In order to be able to set this up, I need to log in as www-data, generate a ssh key and send it to that remote host.