You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SshConstants.java 6.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. /*
  2. * Copyright (C) 2018 Thomas Wolf <thomas.wolf@paranor.ch>
  3. * and other copyright owners as documented in the project's IP log.
  4. *
  5. * This program and the accompanying materials are made available
  6. * under the terms of the Eclipse Distribution License v1.0 which
  7. * accompanies this distribution, is reproduced below, and is
  8. * available at http://www.eclipse.org/org/documents/edl-v10.php
  9. *
  10. * All rights reserved.
  11. *
  12. * Redistribution and use in source and binary forms, with or
  13. * without modification, are permitted provided that the following
  14. * conditions are met:
  15. *
  16. * - Redistributions of source code must retain the above copyright
  17. * notice, this list of conditions and the following disclaimer.
  18. *
  19. * - Redistributions in binary form must reproduce the above
  20. * copyright notice, this list of conditions and the following
  21. * disclaimer in the documentation and/or other materials provided
  22. * with the distribution.
  23. *
  24. * - Neither the name of the Eclipse Foundation, Inc. nor the
  25. * names of its contributors may be used to endorse or promote
  26. * products derived from this software without specific prior
  27. * written permission.
  28. *
  29. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
  30. * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
  31. * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  32. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  33. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  34. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  35. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  36. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  37. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  38. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  39. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  40. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  41. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  42. */
  43. package org.eclipse.jgit.transport;
  44. import org.eclipse.jgit.lib.Constants;
  45. /**
  46. * Constants relating to ssh.
  47. *
  48. * @since 5.2
  49. */
  50. @SuppressWarnings("nls")
  51. public final class SshConstants {
  52. private SshConstants() {
  53. // No instances, please.
  54. }
  55. /** IANA assigned port number for ssh. */
  56. public static final int SSH_DEFAULT_PORT = 22;
  57. /** URI scheme for ssh. */
  58. public static final String SSH_SCHEME = "ssh";
  59. /** URI scheme for sftp. */
  60. public static final String SFTP_SCHEME = "sftp";
  61. /** Default name for a ssh directory. */
  62. public static final String SSH_DIR = ".ssh";
  63. /** Name of the ssh config file. */
  64. public static final String CONFIG = Constants.CONFIG;
  65. /** Default name of the user "known hosts" file. */
  66. public static final String KNOWN_HOSTS = "known_hosts";
  67. // Config file keys
  68. /** Key in an ssh config file. */
  69. public static final String BATCH_MODE = "BatchMode";
  70. /** Key in an ssh config file. */
  71. public static final String CANONICAL_DOMAINS = "CanonicalDomains";
  72. /** Key in an ssh config file. */
  73. public static final String CERTIFICATE_FILE = "CertificateFile";
  74. /** Key in an ssh config file. */
  75. public static final String CIPHERS = "Ciphers";
  76. /** Key in an ssh config file. */
  77. public static final String COMPRESSION = "Compression";
  78. /** Key in an ssh config file. */
  79. public static final String CONNECTION_ATTEMPTS = "ConnectionAttempts";
  80. /** Key in an ssh config file. */
  81. public static final String CONTROL_PATH = "ControlPath";
  82. /** Key in an ssh config file. */
  83. public static final String GLOBAL_KNOWN_HOSTS_FILE = "GlobalKnownHostsFile";
  84. /** Key in an ssh config file. */
  85. public static final String HOST = "Host";
  86. /** Key in an ssh config file. */
  87. public static final String HOST_KEY_ALGORITHMS = "HostKeyAlgorithms";
  88. /** Key in an ssh config file. */
  89. public static final String HOST_NAME = "HostName";
  90. /** Key in an ssh config file. */
  91. public static final String IDENTITIES_ONLY = "IdentitiesOnly";
  92. /** Key in an ssh config file. */
  93. public static final String IDENTITY_AGENT = "IdentityAgent";
  94. /** Key in an ssh config file. */
  95. public static final String IDENTITY_FILE = "IdentityFile";
  96. /** Key in an ssh config file. */
  97. public static final String KEX_ALGORITHMS = "KexAlgorithms";
  98. /** Key in an ssh config file. */
  99. public static final String LOCAL_COMMAND = "LocalCommand";
  100. /** Key in an ssh config file. */
  101. public static final String LOCAL_FORWARD = "LocalForward";
  102. /** Key in an ssh config file. */
  103. public static final String MACS = "MACs";
  104. /** Key in an ssh config file. */
  105. public static final String NUMBER_OF_PASSWORD_PROMPTS = "NumberOfPasswordPrompts";
  106. /** Key in an ssh config file. */
  107. public static final String PORT = "Port";
  108. /** Key in an ssh config file. */
  109. public static final String PREFERRED_AUTHENTICATIONS = "PreferredAuthentications";
  110. /** Key in an ssh config file. */
  111. public static final String PROXY_COMMAND = "ProxyCommand";
  112. /** Key in an ssh config file. */
  113. public static final String REMOTE_COMMAND = "RemoteCommand";
  114. /** Key in an ssh config file. */
  115. public static final String REMOTE_FORWARD = "RemoteForward";
  116. /** Key in an ssh config file. */
  117. public static final String SEND_ENV = "SendEnv";
  118. /** Key in an ssh config file. */
  119. public static final String STRICT_HOST_KEY_CHECKING = "StrictHostKeyChecking";
  120. /** Key in an ssh config file. */
  121. public static final String USER = "User";
  122. /** Key in an ssh config file. */
  123. public static final String USER_KNOWN_HOSTS_FILE = "UserKnownHostsFile";
  124. // Values
  125. /** Flag value. */
  126. public static final String YES = "yes";
  127. /** Flag value. */
  128. public static final String ON = "on";
  129. /** Flag value. */
  130. public static final String TRUE = "true";
  131. /** Flag value. */
  132. public static final String NO = "no";
  133. /** Flag value. */
  134. public static final String OFF = "off";
  135. /** Flag value. */
  136. public static final String FALSE = "false";
  137. // Default identity file names
  138. /** Name of the default RSA private identity file. */
  139. public static final String ID_RSA = "id_rsa";
  140. /** Name of the default DSA private identity file. */
  141. public static final String ID_DSA = "id_dsa";
  142. /** Name of the default ECDSA private identity file. */
  143. public static final String ID_ECDSA = "id_ecdsa";
  144. /** Name of the default ECDSA private identity file. */
  145. public static final String ID_ED25519 = "id_ed25519";
  146. /** All known default identity file names. */
  147. public static final String[] DEFAULT_IDENTITIES = { //
  148. ID_RSA, ID_DSA, ID_ECDSA, ID_ED25519
  149. };
  150. }