SSH and SFTP users
Give a colleague or a client their own sign-in to a site, for a shell across the whole site or for file transfer in one folder.
Before you start
- You can open the site in Managed Websites. Anyone who can open a site can add, change and remove its users.
- A site can have up to 25 users.
- A user connects with the host and port on Connection details, from an IP address on the firewall.
Add a user
Open Users & keys
Go to Managed Websites, choose the site, then Users & keys under Access & security. On the Users card, choose Add user.
Name the user and choose a type
Enter a Username of 3 to 31 lower-case letters, digits and hyphens, starting with a letter. Add a Label saying who it is for, then choose the Type.
Type What the user gets SSH A shell and SFTP across the whole site. SFTP only File transfer only, limited to one Folder. No shell. Choose how the user signs in
Under Password, choose None to use keys only, Generate one or Set one now. A generated password is shown once after the user is added; a password you set has 12 to 64 characters and cannot be shown again.
Add the user
Choose Add user. The user shows Applying, then Active.
Add a key, change or remove a user
Open the user's menu
Open the user's … menu.
Choose the action
Action What it does Add key… Adds a public key of an accepted type that signs in as this user. A user can hold up to 50 keys. Show commands Shows the SSH and SFTP commands for this user. Edit… Changes the label, the type or the folder. The username cannot be changed. Set password…, Rotate password…, Remove password… Sets, replaces or removes the password. Remove user… Ends the user's access. Files they created stay on the site.
The built-in user web cannot be changed or removed: deployments and shared keys use it.
Automate this
Adds a named user to the site or environment: ssh for SSH and SFTP over the whole site, or sftp for SFTP only, limited to one folder.
curl -X POST https://manage.corefinity.com/api/corestack/sites/1042/access/users \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"label": "Photographer",
"password": "generate",
"root_path": "htdocs/wp-content/uploads",
"type": "sftp",
"username": "photographer"
}'Your assistant calls corestack_ssh_user_create.
{
"name": "corestack_ssh_user_create",
"arguments": {
"site_id": 4211,
"username": "deploy",
"type": "ssh"
}
}