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 subcommandAuto Trait Implementations§
impl Freeze for SshAction
impl RefUnwindSafe for SshAction
impl Send for SshAction
impl Sync for SshAction
impl Unpin for SshAction
impl UnsafeUnpin for SshAction
impl UnwindSafe for SshAction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more