pub enum SshAction {
List,
PublicKey {
key: String,
},
Generate {
key: String,
type: SshKeyType,
bits: u32,
comment: Option<String>,
print: bool,
},
Config {
host: Option<String>,
},
Agent {
ttl: Option<String>,
sock: Option<String>,
},
}Variants§
List
List SSH keys stored in the vault (tagged type=ssh or containing PRIVATE KEY).
PublicKey
Extract the public key from a stored SSH private key.
Prints the OpenSSH public key in authorized_keys format to stdout.
Generate
Generate a new SSH key pair and store the private key in the vault.
Uses a CSPRNG (no subprocess). The private key is stored encrypted in the vault; the public key is printed to stdout.
Fields
type: SshKeyTypeKey type: ed25519 (default, recommended) or rsa.
Config
Print an ~/.ssh/config snippet that points IdentityAgent at tsafe.
Pipe or append the output to ~/.ssh/config.
Agent
Start a persistent SSH agent serving vault keys on a Unix socket.
Keys are loaded once at startup and served for the configured TTL. On Windows this subcommand prints a clear error — Unix socket required.
Eval idiom: eval $(tsafe ssh-agent)
Trait Implementations§
Source§impl FromArgMatches for SshAction
impl FromArgMatches for SshAction
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for SshAction
impl Subcommand for SshAction
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand