// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. //! The SSH front-end: publickey auth and `exec` dispatch into pack processes. //! //! A `russh` server accepts only `publickey` auth (matching the offered key's //! SHA256 fingerprint against the `keys` table), handles only the `exec` channel //! request, and streams the channel data to and from a spawned `git` //! upload-pack/receive-pack process via [`git::pack`]. Anything else — a shell, //! a PTY, an unrecognized command — gets a friendly banner and a non-zero exit. mod command; mod hostkey; mod resolve; mod server; pub use crate::server::serve; /// An error from the SSH layer. #[derive(Debug, thiserror::Error)] pub enum SshError { /// A filesystem or socket I/O error. #[error(transparent)] Io(#[from] std::io::Error), /// The host key could not be generated, read, or written. #[error("host key error: {0}")] HostKey(String), /// The russh server failed to start or run. #[error("ssh server error: {0}")] Server(String), }