Skip to content

dantecatalfamo/ox-ssh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ox-ssh

https://melpa.org/packages/ox-ssh-badge.svg

SSH configuration export for org-mode.

Commands

ox-ssh provides the following interactive commands:

  • org-ssh-export-as-config Exports to a temporary buffer
  • org-ssh-export-to-config Exports to file with the extension .ssh_config
  • org-ssh-export-overwrite-user-config Exports file, overwrites user’s ~/.ssh/config. Prompts user with yes/no option before doing so.

These commands are also exposed through the org-export-dispatch menu.

Variables

  • org-ssh-header An optional header that will be added to the beginning of the export. This can be used for comments or rules that apply to all hosts.
  • org-ssh-export-suffix The suffix that will be added to exported file. Defaults to .ssh_config.

Usage

Export headings with specific properties as entries in an SSH configuration file. These properties correspond with the client configuration options for SSH.

For a heading to be exported as a host, it must have either a HOSTNAME or IP property. If an entry has both, IP takes precedence. The host alias will be equal to the org title or be overriden by the property HOST_OVERRIDE, if it is defined.

It can also contain one or more optional parameters, listed in the table below.

ssh_config(5) optionox-ssh property
AddKeysToAgentSSH_ADD_KEYS_TO_AGENT
AddressFamilySSH_ADDRESS_FAMILY
BatchModeSSH_BATCH_MODE
BindInterfaceSSH_BIND_INTERFACE
CanonicalDomainsSSH_CANONICAL_DOMAINS
CanonicalizeFallbackLocalSSH_CANONICALIZE_FALLBACK_LOCAL
CanonicalizeHostnameSSH_CANONICALIZE_HOSTNAME
CanonicalizeMaxDotsSSH_CANONICALIZE_MAX_DOTS
CanonicalizePermittedCNAMEsSSH_CANONICALIZE_PERMITTED_CNAMES
CASignatureAlgorithmsSSH_CA_SIGNATURE_ALGORITHMS
CertificateFileSSH_CERTIFICATE_FILE
ChallengeResponseAuthenticationSSH_CHALLENGE_RESPONSE_AUTHENTICATION
CheckHostIPSSH_CHECK_HOST_IP
CiphersSSH_CIPHERS
ClearAllForwardingsSSH_CLEAR_ALL_FORWARDINGS
CompressionSSH_COMPRESSION
ConnectionAttemptsSSH_CONNECTION_ATTEMPTS
ConnectTimeoutSSH_CONNECT_TIMEOUT
ControlMasterSSH_CONTROL_MASTER
ControlPathSSH_CONTROL_PATH
ControlPersistSSH_CONTROL_PERSIST
DynamicForwardSSH_DYNAMIC_FORWARD
EnableSSHKeysignSSH_ENABLE_SSH_KEYSIGN
EscapeCharSSH_ESCAPE_CHAR
ExitOnForwardFailureSSH_EXIT_ON_FORWARD_FAILURE
FingerprintHashSSH_FINGERPRINT_HASH
ForwardAgentSSH_FORWARD_AGENT
ForwardX11SSH_FORWARD_X11
ForwardX11TimeoutSSH_FORWARD_X11_TIMEOUT
ForwardX11TrustedSSH_FORWARD_X11_TRUSTED
GatewayPortsSSH_GATEWAY_PORTS
GlobalKnownHostsFileSSH_GLOBAL_KNOWN_HOSTS_FILE
GSSAPIAuthenticationSSH_GSSAPI_AUTHENTICATION
GSSAPIDelegateCredentialsSSH_GSSAPI_DELEGATE_CREDENTIALS
HashKnownHostsSSH_HASH_KNOWN_HOSTS
HostBasedAuthenticationSSH_HOST_BASED_AUTHENTICATION
HostBasedKeyTypesSSH_HOST_BASED_KEY_TYPES
HostKeyAlgorithmsSSH_HOST_KEY_ALGORITHMS
HostKeyAliasSSH_HOST_KEY_ALIAS
HostnameSSH_HOSTNAME
IdentitiesOnlySSH_IDENTITIES_ONLY
IdentityAgentSSH_IDENTITY_AGENT
IdentityFileSSH_IDENTITY_FILE
IgnoreUnknownSSH_IGNORE_UNKNOWN
IncludeSSH_INCLUDE
IPQoSSSH_IP_QOS
KbdInteractiveAuthenticationSSH_KBD_INTERACTIVE_AUTHENTICATION
KbdInteractiveDevicesSSH_KBD_INTERACTIVE_DEVICES
KexAlgorithmsSSH_KEX_ALGORITHMS
LocalCommandSSH_LOCAL_COMMAND
LocalForwardSSH_LOCAL_FORWARD
LogLevelSSH_LOG_LEVEL
MACsSSH_MACS
NoHostAuthenticationForLocalhostSSH_NO_HOST_AUTHENTICATION_FOR_LOCALHOST
NumberOfPasswordPromptsSSH_NUMBER_OF_PASSWORD_PROMPTS
PasswordAuthenticationSSH_PASSWORD_AUTHENTICATION
PermitLocalCommandSSH_PERMIT_LOCAL_COMMAND
PKCS11ProviderSSH_PKCS11_PROVIDER
PortSSH_PORT
PreferredAuthenticationsSSH_PREFERRED_AUTHENTICATIONS
ProxyCommandSSH_PROXY_COMMAND
ProxyJumpSSH_PROXY_JUMP
ProxyUseFdPassSSH_PROXY_USE_FD_PASS
PubkeyAcceptedKeyTypesSSH_PUBKEY_ACCEPTED_KEY_TYPES
PubkeyAuthenticationSSH_PUBKEY_AUTHENTICATION
RekeyLimitSSH_REKEY_LIMIT
RemoteCommandSSH_REMOTE_COMMAND
RemoteForwardSSH_REMOTE_FORWARD
RequestTTYSSH_REQUEST_TTY
RevokedHostKeysSSH_REVOKED_HOST_KEYS
SecurityKeyProviderSSH_SECURITY_KEY_PROVIDER
SendEnvSSH_SEND_ENV
ServerAliveMaxCountSSH_SERVER_ALIVE_MAX_COUNT
ServerAliveIntervalSSH_SERVER_ALIVE_INTERVAL
SetEnvSSH_SET_ENV
StreamLocalBindMaskSSH_STREAM_LOCAL_BIND_MASK
StreamLocalBindUnlinkSSH_STREAM_LOCAL_BIND_UNLINK
StrictHostKeyCheckingSSH_STRICT_HOST_KEY_CHECKING
SyslogFacilitySSH_SYSLOG_FACILITY
TCPKeepAliveSSH_TCP_KEEP_ALIVE
TunnelSSH_TUNNEL
TunnelDeviceSSH_TUNNEL_DEVICE
UpdateHostKeysSSH_UPDATE_HOST_KEYS
UserSSH_USER
UserKnownHostsFileSSH_USER_KNOWN_HOSTS_FILE
VerifyHostKeyDNSSSH_VERIFY_HOST_KEY_DNS
VisualHostKeySSH_VISUAL_HOST_KEY
XAuthLocationSSH_X_AUTH_LOCATION

Example

ox-ssh-example.jpg