SFTP users
loch sftp manages the SFTP accounts that give access to the files of a site. Admin only; the SFTP module must be enabled on the server. Panel side: SFTP.
Commands
| Command | Does |
|---|---|
loch sftp sites | Lists the sites. |
loch sftp users | Lists the users (--site to filter). |
loch sftp create <username> --site <site> | Creates a user in a site. Asks for the password. |
loch sftp reset-password <username> | Sets a new password. |
loch sftp enable <username> | Enables a user. |
loch sftp disable <username> | Disables a user: it can no longer log in. |
loch sftp delete <username> | Deletes the account. |
loch sftp create alice --site blog --subpath web/uploads
loch sftp users --site blog
loch sftp reset-password alice
loch sftp delete alice
Permissions
| Command | Scope | Admin |
|---|---|---|
sites, users | sftp:read | Yes |
create, reset-password, enable, disable, delete | sftp:write | Yes |
Good to know
--subpathconfines the user to a sub-directory of the site. It cannot change later.createalso accepts an SSH key (--ssh-key), quotas and a bandwidth limit.--passwordis visible in the process list: prefer the prompt.- Deleting a user keeps the files of its home directory.