Files
markbase/markbase-core/src/cli/interface/ssh.rs
T
Warren 45ae7099d2
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
Fix compilation errors after PostgreSQL removal
Changes:
- Remove pg_conn field from SshServerConfig struct
- Remove pg_conn parameter from run_ssh_server function
- Remove pg_conn CLI argument from ssh-start command
- Remove non-existent user management API routes
- Add missing dependencies: sysinfo, dirs
- Fix CLI web.rs to pass home directory to server::run
- Fix SSH server stream type (tokio -> std TcpStream)

All compilation errors resolved.
2026-10-24 20:12:23 +08:00

25 lines
700 B
Rust

use clap::Subcommand;
#[derive(Subcommand)]
pub enum SshCommand {
#[command(name = "ssh-start")]
Start {
#[arg(short, long, default_value = "2024")]
port: u16,
},
}
pub async fn handle_ssh_command(cmd: SshCommand) -> anyhow::Result<()> {
match cmd {
SshCommand::Start { port } => {
println!("🚀 Starting SSH server (MarkBaseSSH 1.0)");
println!(" Port: {}", port);
println!(" Auth Provider: SQLite");
println!(" Security: ⭐⭐⭐⭐⭐ (RustCrypto authoritative libraries)");
println!();
crate::ssh_server::server::run_ssh_server(Some(port)).await?;
}
}
Ok(())
}