Sharing Spaces
Spaces can be shared between users on the same knot server, allowing users to access and manage the space collaboratively. Shared spaces enable users to:
- SSH into the space.
- Access its web interface.
- Use its web terminal.
Key Details
- Core: A space can be shared with one user at a time.
- Pro: A space can be shared with multiple users simultaneously.
- The original owner and all shared users have equal access to the space.
How to Share a Space
-
Navigate to the
Spacespage. -
Select the space you want to share.
-
Click the
Sharemenu item.
Share Space -
A dialog will appear, allowing you to select the target user from a dropdown list.
- Click the target user’s name in the dropdown to select them.
-
Click the
Share Space withbutton to complete the sharing process.
Cancelling a Shared Space
- The owner can cancel sharing at any time by selecting the
Stop Sharingmenu item. - Shared users can leave a shared space from the same menu.
- Once cancelled:
- The space will no longer be accessible to the removed user.
- SSH keys belonging to the removed user will be removed from the space.
Sharing via Scripting
Use the knot.space library to share and unshare spaces programmatically:
import knot.space as space
# Share a space with a user (accepts user ID, username, or email)
space.share("my-space", "[email protected]")
# Remove sharing for a specific user
space.unshare("my-space", user_id="[email protected]")
# Stop all sharing (owner only)
space.unshare("my-space")Important Notes
Ensure the target user’s name is clicked in the dropdown list to confirm the selection.