id = "ssh" name = "OpenSSH" homepage = "https://www.openssh.com" description = "The OpenSSH client: encrypted remote login, and a config that names how to reach each host." icon = "theSVG:ssh" executables = ["ssh"] [dotfiles] # ssh_config(5) FILES: ~/.ssh/config is the per-user client config. The # Include directive makes ~/.ssh/config.d a common split-config convention. paths = ["~/.ssh/config", "~/.ssh/config.d/"] # known_hosts is per-machine trust state that both ssh and the user rewrite # constantly; syncing it produces conflicts with no benefit. exclude = [ "~/.ssh/known_hosts", "~/.ssh/known_hosts.old", "~/.ssh/authorized_keys", ] # Private keys. `~/.ssh/id_*` deliberately also catches the matching .pub # files: over-classifying a public key costs a little convenience, and this # list is a floor, not a ceiling. secret = ["~/.ssh/id_*", "~/.ssh/*.pem", "~/.ssh/*.key"] # All four name this machine's own key material and sockets: which key to # offer, which agent to talk to, where the multiplexing socket and known_hosts # live. The user set them and needs them back to rebuild this box, but the # paths mean nothing on another. [[dotfiles.machine_lines]] file = "~/.ssh/config" match = { prefix = ["IdentityFile", "IdentityAgent", "ControlPath", "UserKnownHostsFile"] } scope = "backup" [commands] format = 1 label = "SSH connection" description = "Connect to a host with a user, port, identity file and common forwarding options. Cipher, MAC and PKCS#11 options are left out." quality = "ai-draft" base = "fig:ssh" parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = true, short_bundles = true } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/ssh.ts" license = "MIT" [[commands.field]] id = "host" label = "Host" type = "string" position = 0 description = "Address of the remote machine, optionally user@hostname." provider = "builtin:ssh.hosts" sources = ["fig"] [[commands.field]] id = "login" label = "Login name" type = "string" option = ["-l"] description = "The user to log in as on the remote machine." sources = ["fig"] [[commands.field]] id = "port" label = "Port" type = "integer" option = ["-p"] description = "Port to connect to on the remote host." sources = ["fig"] [[commands.field]] id = "identity" label = "Identity file" type = "path" option = ["-i"] description = "Private key file for public key authentication." multiple = true path = { kind = "file", role = "input" } sources = ["fig"] [[commands.field]] id = "config" label = "Config file" type = "path" option = ["-F"] description = "An alternative per-user configuration file." path = { kind = "file", role = "input" } sources = ["fig"] [[commands.field]] id = "local_forward" label = "Local forward" type = "string" option = ["-L"] description = "Forward a local port: port:host:hostport." multiple = true sources = ["fig"] [[commands.field]] id = "remote_forward" label = "Remote forward" type = "string" option = ["-R"] description = "Forward a remote port: port:host:hostport." multiple = true sources = ["fig"] [[commands.field]] id = "dynamic_forward" label = "Dynamic forward port" type = "string" option = ["-D"] description = "Local dynamic application-level port forwarding (SOCKS)." sources = ["fig"] [[commands.field]] id = "jump" label = "Option (key=value)" type = "string" option = ["-o"] description = "Option in config-file format, e.g. ServerAliveInterval=30." multiple = true sources = ["fig"] [[commands.field]] id = "agent" label = "Forward agent" type = "boolean" option = ["-A"] description = "Enable forwarding of the authentication agent connection." sources = ["fig"] [[commands.field]] id = "compress" label = "Compress" type = "boolean" option = ["-C"] description = "Request compression of all data." sources = ["fig"] [[commands.field]] id = "no_command" label = "No remote command" type = "boolean" option = ["-N"] description = "Do not execute a remote command; useful for forwarding." sources = ["fig"] [[commands.field]] id = "background" label = "Go to background" type = "boolean" option = ["-f"] description = "Go to background just before command execution." sources = ["fig"] [[commands.field]] id = "force_tty" label = "Force TTY" type = "boolean" option = ["-t"] description = "Force pseudo-tty allocation." sources = ["fig"] [[commands.field]] id = "x11" label = "X11 forwarding" type = "boolean" option = ["-X"] description = "Enable X11 forwarding." sources = ["fig"] [[commands.field]] id = "verbose" label = "Verbosity" type = "count" option = ["-v"] description = "Verbose mode; repeat for more debugging output." sources = ["fig"] [[commands.task]] id = "connect" label = "Connect" fields = ["host", "login", "port", "identity"] required = ["host"] [[commands.task]] id = "tunnel" label = "Port-forward tunnel" set = { no_command = [true] } fields = ["host", "local_forward", "port", "identity"] required = ["host", "local_forward"] [[commands.task]] id = "socks" label = "SOCKS proxy" set = { no_command = [true] } fields = ["host", "dynamic_forward", "identity"] required = ["host", "dynamic_forward"] [[commands.group]] id = "basic" label = "Basic" fields = ["host", "login", "port", "identity", "local_forward", "remote_forward", "dynamic_forward", "no_command"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["config", "jump", "agent", "compress", "background", "force_tty", "x11", "verbose"]