msh CLI Reference
msh is the client CLI for Mezite. It lets end users authenticate,
open SSH sessions, transfer files, and manage access requests.
login
Authenticate to a Mezite cluster and receive short-lived certificates.
Login to a cluster bash
# Login with password
msh login --proxy=mezite.example.com:3080
# Login with a specific user
msh login --proxy=mezite.example.com:3080 --user=admin ssh
Open an interactive SSH session to a registered node.
SSH into a node bash
# Connect to a node
msh ssh user@node-hostname
# Connect with a specific cluster
msh ssh --cluster=production user@web-01
# Run a command remotely
msh ssh user@node-hostname -- ls -la /var/log scp
Transfer files to or from a remote node using SCP.
File transfer with SCP bash
# Copy a file to a remote node
msh scp ./local-file.txt user@node-hostname:/tmp/
# Copy a file from a remote node
msh scp user@node-hostname:/var/log/app.log ./app.log ls
List nodes available in the current cluster.
List nodes bash
# List all nodes
msh ls
# Filter by label
msh ls env=production sessions
List active and past SSH sessions.
Session management bash
# List sessions
msh sessions ls play
Play back a recorded SSH session.
Session playback bash
# Replay a recorded session
msh play <session-id>
# Replay at 2x speed
msh play --speed=2.0 <session-id> request
Create and list access requests for elevated privileges.
Access requests bash
# Create an access request for a role
msh request create --roles=admin --reason="Deploy hotfix"
# List pending requests
msh request ls status
Display the current login status, including cluster, user, and certificate expiry.
Check login status bash
msh status logout
Remove local certificates and end the current session.
Logout bash
msh logout