https://github.com/dantecatalfamo/ox-ssh
SSH config export for org-mode
https://github.com/dantecatalfamo/ox-ssh
configuration elisp emacs exporter org-mode ssh
Last synced: 5 months ago
JSON representation
SSH config export for org-mode
- Host: GitHub
- URL: https://github.com/dantecatalfamo/ox-ssh
- Owner: dantecatalfamo
- License: gpl-3.0
- Created: 2020-10-11T20:25:39.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-09-17T15:17:25.000Z (over 3 years ago)
- Last Synced: 2023-03-05T21:51:51.647Z (about 2 years ago)
- Topics: configuration, elisp, emacs, exporter, org-mode, ssh
- Language: Emacs Lisp
- Homepage:
- Size: 129 KB
- Stars: 32
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
* ox-ssh
[[https://melpa.org/#/ox-ssh][file: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.| [[https://man.openbsd.org/man5/ssh_config.5][ssh_config(5)]] option | ox-ssh property |
|----------------------------------+--------------------------------------------|
| [[https://man.openbsd.org/man5/ssh_config.5#AddKeysToAgent][AddKeysToAgent]] | =SSH_ADD_KEYS_TO_AGENT= |
| [[https://man.openbsd.org/man5/ssh_config.5#AddressFamily][AddressFamily]] | =SSH_ADDRESS_FAMILY= |
| [[https://man.openbsd.org/man5/ssh_config.5#BatchMode][BatchMode]] | =SSH_BATCH_MODE= |
| [[https://man.openbsd.org/man5/ssh_config.5#BindInterface][BindInterface]] | =SSH_BIND_INTERFACE= |
| [[https://man.openbsd.org/man5/ssh_config.5#CanonicalDomains][CanonicalDomains]] | =SSH_CANONICAL_DOMAINS= |
| [[https://man.openbsd.org/man5/ssh_config.5#CanonicalizeFallbackLocal][CanonicalizeFallbackLocal]] | =SSH_CANONICALIZE_FALLBACK_LOCAL= |
| [[https://man.openbsd.org/man5/ssh_config.5#CanonicalizeHostname][CanonicalizeHostname]] | =SSH_CANONICALIZE_HOSTNAME= |
| [[https://man.openbsd.org/man5/ssh_config.5#CanonicalizeMaxDots][CanonicalizeMaxDots]] | =SSH_CANONICALIZE_MAX_DOTS= |
| [[https://man.openbsd.org/man5/ssh_config.5#CanonicalizePermittedCNAMEs][CanonicalizePermittedCNAMEs]] | =SSH_CANONICALIZE_PERMITTED_CNAMES= |
| [[https://man.openbsd.org/man5/ssh_config.5#CASignatureAlgorithms][CASignatureAlgorithms]] | =SSH_CA_SIGNATURE_ALGORITHMS= |
| [[https://man.openbsd.org/man5/ssh_config.5#CertificateFile][CertificateFile]] | =SSH_CERTIFICATE_FILE= |
| [[https://man.openbsd.org/man5/ssh_config.5#ChallengeResponseAuthentication][ChallengeResponseAuthentication]] | =SSH_CHALLENGE_RESPONSE_AUTHENTICATION= |
| [[https://man.openbsd.org/man5/ssh_config.5#CheckHostIP][CheckHostIP]] | =SSH_CHECK_HOST_IP= |
| [[https://man.openbsd.org/man5/ssh_config.5#Ciphers][Ciphers]] | =SSH_CIPHERS= |
| [[https://man.openbsd.org/man5/ssh_config.5#ClearAllForwardings][ClearAllForwardings]] | =SSH_CLEAR_ALL_FORWARDINGS= |
| [[https://man.openbsd.org/man5/ssh_config.5#Compression][Compression]] | =SSH_COMPRESSION= |
| [[https://man.openbsd.org/man5/ssh_config.5#ConnectionAttempts][ConnectionAttempts]] | =SSH_CONNECTION_ATTEMPTS= |
| [[https://man.openbsd.org/man5/ssh_config.5#ConnectTimeout][ConnectTimeout]] | =SSH_CONNECT_TIMEOUT= |
| [[https://man.openbsd.org/man5/ssh_config.5#ControlMaster][ControlMaster]] | =SSH_CONTROL_MASTER= |
| [[https://man.openbsd.org/man5/ssh_config.5#ControlPath][ControlPath]] | =SSH_CONTROL_PATH= |
| [[https://man.openbsd.org/man5/ssh_config.5#ControlPersist][ControlPersist]] | =SSH_CONTROL_PERSIST= |
| [[https://man.openbsd.org/man5/ssh_config.5#DynamicForward][DynamicForward]] | =SSH_DYNAMIC_FORWARD= |
| [[https://man.openbsd.org/man5/ssh_config.5#EnableSSHKeysign][EnableSSHKeysign]] | =SSH_ENABLE_SSH_KEYSIGN= |
| [[https://man.openbsd.org/man5/ssh_config.5#EscapeChar][EscapeChar]] | =SSH_ESCAPE_CHAR= |
| [[https://man.openbsd.org/man5/ssh_config.5#ExitOnForwardFailure][ExitOnForwardFailure]] | =SSH_EXIT_ON_FORWARD_FAILURE= |
| [[https://man.openbsd.org/man5/ssh_config.5#FingerprintHash][FingerprintHash]] | =SSH_FINGERPRINT_HASH= |
| [[https://man.openbsd.org/man5/ssh_config.5#ForwardAgent][ForwardAgent]] | =SSH_FORWARD_AGENT= |
| [[https://man.openbsd.org/man5/ssh_config.5#ForwardX11][ForwardX11]] | =SSH_FORWARD_X11= |
| [[https://man.openbsd.org/man5/ssh_config.5#ForwardX11Timeout][ForwardX11Timeout]] | =SSH_FORWARD_X11_TIMEOUT= |
| [[https://man.openbsd.org/man5/ssh_config.5#ForwardX11Trusted][ForwardX11Trusted]] | =SSH_FORWARD_X11_TRUSTED= |
| [[https://man.openbsd.org/man5/ssh_config.5#GatewayPorts][GatewayPorts]] | =SSH_GATEWAY_PORTS= |
| [[https://man.openbsd.org/man5/ssh_config.5#GlobalKnownHostsFile][GlobalKnownHostsFile]] | =SSH_GLOBAL_KNOWN_HOSTS_FILE= |
| [[https://man.openbsd.org/man5/ssh_config.5#GSSAPIAuthentication][GSSAPIAuthentication]] | =SSH_GSSAPI_AUTHENTICATION= |
| [[https://man.openbsd.org/man5/ssh_config.5#GSSAPIDelegateCredentials][GSSAPIDelegateCredentials]] | =SSH_GSSAPI_DELEGATE_CREDENTIALS= |
| [[https://man.openbsd.org/man5/ssh_config.5#HashKnownHosts][HashKnownHosts]] | =SSH_HASH_KNOWN_HOSTS= |
| [[https://man.openbsd.org/man5/ssh_config.5#HostBasedAuthentication][HostBasedAuthentication]] | =SSH_HOST_BASED_AUTHENTICATION= |
| [[https://man.openbsd.org/man5/ssh_config.5#HostBasedKeyTypes][HostBasedKeyTypes]] | =SSH_HOST_BASED_KEY_TYPES= |
| [[https://man.openbsd.org/man5/ssh_config.5#HostKeyAlgorithms][HostKeyAlgorithms]] | =SSH_HOST_KEY_ALGORITHMS= |
| [[https://man.openbsd.org/man5/ssh_config.5#HostKeyAlias][HostKeyAlias]] | =SSH_HOST_KEY_ALIAS= |
| [[https://man.openbsd.org/man5/ssh_config.5#Hostname][Hostname]] | =SSH_HOSTNAME= |
| [[https://man.openbsd.org/man5/ssh_config.5#IdentitiesOnly][IdentitiesOnly]] | =SSH_IDENTITIES_ONLY= |
| [[https://man.openbsd.org/man5/ssh_config.5#IdentityAgent][IdentityAgent]] | =SSH_IDENTITY_AGENT= |
| [[https://man.openbsd.org/man5/ssh_config.5#IdentityFile][IdentityFile]] | =SSH_IDENTITY_FILE= |
| [[https://man.openbsd.org/man5/ssh_config.5#IgnoreUnknown][IgnoreUnknown]] | =SSH_IGNORE_UNKNOWN= |
| [[https://man.openbsd.org/man5/ssh_config.5#Include][Include]] | =SSH_INCLUDE= |
| [[https://man.openbsd.org/man5/ssh_config.5#IPQoS][IPQoS]] | =SSH_IP_QOS= |
| [[https://man.openbsd.org/man5/ssh_config.5#KbdInteractiveAuthentication][KbdInteractiveAuthentication]] | =SSH_KBD_INTERACTIVE_AUTHENTICATION= |
| [[https://man.openbsd.org/man5/ssh_config.5#KbdInteractiveDevices][KbdInteractiveDevices]] | =SSH_KBD_INTERACTIVE_DEVICES= |
| [[https://man.openbsd.org/man5/ssh_config.5#KexAlgorithms][KexAlgorithms]] | =SSH_KEX_ALGORITHMS= |
| [[https://man.openbsd.org/man5/ssh_config.5#LocalCommand][LocalCommand]] | =SSH_LOCAL_COMMAND= |
| [[https://man.openbsd.org/man5/ssh_config.5#LocalForward][LocalForward]] | =SSH_LOCAL_FORWARD= |
| [[https://man.openbsd.org/man5/ssh_config.5#LogLevel][LogLevel]] | =SSH_LOG_LEVEL= |
| [[https://man.openbsd.org/man5/ssh_config.5#MACs][MACs]] | =SSH_MACS= |
| [[https://man.openbsd.org/man5/ssh_config.5#NoHostAuthenticationForLocalhost][NoHostAuthenticationForLocalhost]] | =SSH_NO_HOST_AUTHENTICATION_FOR_LOCALHOST= |
| [[https://man.openbsd.org/man5/ssh_config.5#NumberOfPasswordPrompts][NumberOfPasswordPrompts]] | =SSH_NUMBER_OF_PASSWORD_PROMPTS= |
| [[https://man.openbsd.org/man5/ssh_config.5#PasswordAuthentication][PasswordAuthentication]] | =SSH_PASSWORD_AUTHENTICATION= |
| [[https://man.openbsd.org/man5/ssh_config.5#PermitLocalCommand][PermitLocalCommand]] | =SSH_PERMIT_LOCAL_COMMAND= |
| [[https://man.openbsd.org/man5/ssh_config.5#PKCS11Provider][PKCS11Provider]] | =SSH_PKCS11_PROVIDER= |
| [[https://man.openbsd.org/man5/ssh_config.5#Port][Port]] | =SSH_PORT= |
| [[https://man.openbsd.org/man5/ssh_config.5#PreferredAuthentications][PreferredAuthentications]] | =SSH_PREFERRED_AUTHENTICATIONS= |
| [[https://man.openbsd.org/man5/ssh_config.5#ProxyCommand][ProxyCommand]] | =SSH_PROXY_COMMAND= |
| [[https://man.openbsd.org/man5/ssh_config.5#ProxyJump][ProxyJump]] | =SSH_PROXY_JUMP= |
| [[https://man.openbsd.org/man5/ssh_config.5#ProxyUseFdPass][ProxyUseFdPass]] | =SSH_PROXY_USE_FD_PASS= |
| [[https://man.openbsd.org/man5/ssh_config.5#PubkeyAcceptedKeyTypes][PubkeyAcceptedKeyTypes]] | =SSH_PUBKEY_ACCEPTED_KEY_TYPES= |
| [[https://man.openbsd.org/man5/ssh_config.5#PubkeyAuthentication][PubkeyAuthentication]] | =SSH_PUBKEY_AUTHENTICATION= |
| [[https://man.openbsd.org/man5/ssh_config.5#RekeyLimit][RekeyLimit]] | =SSH_REKEY_LIMIT= |
| [[https://man.openbsd.org/man5/ssh_config.5#RemoteCommand][RemoteCommand]] | =SSH_REMOTE_COMMAND= |
| [[https://man.openbsd.org/man5/ssh_config.5#RemoteForward][RemoteForward]] | =SSH_REMOTE_FORWARD= |
| [[https://man.openbsd.org/man5/ssh_config.5#RequestTTY][RequestTTY]] | =SSH_REQUEST_TTY= |
| [[https://man.openbsd.org/man5/ssh_config.5#RevokedHostKeys][RevokedHostKeys]] | =SSH_REVOKED_HOST_KEYS= |
| [[https://man.openbsd.org/man5/ssh_config.5#SecurityKeyProvider][SecurityKeyProvider]] | =SSH_SECURITY_KEY_PROVIDER= |
| [[https://man.openbsd.org/man5/ssh_config.5#SendEnv][SendEnv]] | =SSH_SEND_ENV= |
| [[https://man.openbsd.org/man5/ssh_config.5#ServerAliveMaxCount][ServerAliveMaxCount]] | =SSH_SERVER_ALIVE_MAX_COUNT= |
| [[https://man.openbsd.org/man5/ssh_config.5#ServerAliveInterval][ServerAliveInterval]] | =SSH_SERVER_ALIVE_INTERVAL= |
| [[https://man.openbsd.org/man5/ssh_config.5#SetEnv][SetEnv]] | =SSH_SET_ENV= |
| [[https://man.openbsd.org/man5/ssh_config.5#StreamLocalBindMask][StreamLocalBindMask]] | =SSH_STREAM_LOCAL_BIND_MASK= |
| [[https://man.openbsd.org/man5/ssh_config.5#StreamLocalBindUnlink][StreamLocalBindUnlink]] | =SSH_STREAM_LOCAL_BIND_UNLINK= |
| [[https://man.openbsd.org/man5/ssh_config.5#StrictHostKeyChecking][StrictHostKeyChecking]] | =SSH_STRICT_HOST_KEY_CHECKING= |
| [[https://man.openbsd.org/man5/ssh_config.5#SyslogFacility][SyslogFacility]] | =SSH_SYSLOG_FACILITY= |
| [[https://man.openbsd.org/man5/ssh_config.5#TCPKeepAlive][TCPKeepAlive]] | =SSH_TCP_KEEP_ALIVE= |
| [[https://man.openbsd.org/man5/ssh_config.5#Tunnel][Tunnel]] | =SSH_TUNNEL= |
| [[https://man.openbsd.org/man5/ssh_config.5#TunnelDevice][TunnelDevice]] | =SSH_TUNNEL_DEVICE= |
| [[https://man.openbsd.org/man5/ssh_config.5#UpdateHostKeys][UpdateHostKeys]] | =SSH_UPDATE_HOST_KEYS= |
| [[https://man.openbsd.org/man5/ssh_config.5#User][User]] | =SSH_USER= |
| [[https://man.openbsd.org/man5/ssh_config.5#UserKnownHostsFile][UserKnownHostsFile]] | =SSH_USER_KNOWN_HOSTS_FILE= |
| [[https://man.openbsd.org/man5/ssh_config.5#VerifyHostKeyDNS][VerifyHostKeyDNS]] | =SSH_VERIFY_HOST_KEY_DNS= |
| [[https://man.openbsd.org/man5/ssh_config.5#VisualHostKey][VisualHostKey]] | =SSH_VISUAL_HOST_KEY= |
| [[https://man.openbsd.org/man5/ssh_config.5#XAuthLocation][XAuthLocation]] | =SSH_X_AUTH_LOCATION= |
** Example
[[file:ox-ssh-example.jpg]]