Proof of Concept: Build my own Web Provider at home (II) – sshd
sshd

Secure Shell
The sshd daemon will be used to access the system. If we want to have multiple web instances, each one managed by different individuals, we’d usually think about setting up a FTP server and create virtual users (so we know they cannot log in). Or, we can use the SFTP subsystem, rely on the OS user management and also have Secure FTP only access to our system. Even more, we can create RSA keys for the users so they don’t need to worry about passwords. The main features of the setup would be:
- We will grant only SFTP access to the UNIX accounts of the web instances, this way we will have a Secure FTP server that relies on the system accounts. No shell access will be granted to these users.
- The access to the root user is disabled (we can allow forced commands to run rsync scripts)
- The UNIX group sshusers defines the users that can access to a shell via ssh
- The UNIX group sftpweb defines the users that will only access the system via SFTP (they cannot get a shell).This group contains all the users created to run the Web instances. In fact, they will only be able to access a particular directory (in this example this directory is
/home/user/data
, where the user will find hishtdocs/
andlogs/
directories of the web instance) - In the case that Public Key authentication is going to be used, make sure we manage the public keys, so the users cannot modify them.