Skip to content

Instantly share code, notes, and snippets.

@takuya
Last active October 5, 2016 15:18
Show Gist options
  • Save takuya/1cee091b4332997e44d7a220f024066f to your computer and use it in GitHub Desktop.
Save takuya/1cee091b4332997e44d7a220f024066f to your computer and use it in GitHub Desktop.
Match   Introduces a conditional block.  If all of the criteria on the Match line are satisfied, the key‐
         words on the following lines override those set in the global section of the config file, until
         either another Match line or the end of the file.  If a keyword appears in multiple Match blocks
         that are satisified, only the first instance of the keyword is applied.

         The arguments to Match are one or more criteria-pattern pairs or the single token All which matches
         all criteria.  The available criteria are User, Group, Host, LocalAddress, LocalPort, and Address.
         The match patterns may consist of single entries or comma-separated lists and may use the wildcard
         and negation operators described in the PATTERNS section of ssh_config(5).

         The patterns in an Address criteria may additionally contain addresses to match in CIDR
         address/masklen format, e.g. “192.0.2.0/24” or “3ffe:ffff::/32”.  Note that the mask length pro‐
         vided must be consistent with the address - it is an error to specify a mask length that is too
         long for the address or one with bits set in this host portion of the address.  For example,
         “192.0.2.0/33” and “192.0.2.0/8” respectively.

         Only a subset of keywords may be used on the lines following a Match keyword.  Available keywords
         以下のキーワードが使えます。
         are AcceptEnv, AllowAgentForwarding, AllowGroups, AllowTcpForwarding, AllowUsers,
         AuthenticationMethods, AuthorizedKeysCommand, AuthorizedKeysCommandUser, **AuthorizedKeysFile**,
         AuthorizedPrincipalsFile, Banner, ChrootDirectory, DenyGroups, DenyUsers, ForceCommand,
         GatewayPorts, GSSAPIAuthentication, HostbasedAuthentication, HostbasedUsesNameFromPacketOnly,
         KbdInteractiveAuthentication, KerberosAuthentication, MaxAuthTries, MaxSessions,
         PasswordAuthentication, PermitEmptyPasswords, PermitOpen, PermitRootLogin, PermitTTY, PermitTunnel,
         PermitUserRC, PubkeyAuthentication, RekeyLimit, RhostsRSAAuthentication, RSAAuthentication,
         X11DisplayOffset, X11Forwarding and X11UseLocalHost.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment