Package com.jcraft.jsch
Class OpenSSHConfig
java.lang.Object
com.jcraft.jsch.OpenSSHConfig
- All Implemented Interfaces:
ConfigRepository
This class implements ConfigRepository interface, and parses
OpenSSH's configuration file. The following keywords will be recognized,
- Host
- User
- Hostname
- Port
- PreferredAuthentications
- IdentityFile
- NumberOfPasswordPrompts
- ConnectTimeout
- HostKeyAlias
- UserKnownHostsFile
- KexAlgorithms
- HostKeyAlgorithms
- Ciphers
- Macs
- Compression
- CompressionLevel
- ForwardAgent
- RequestTTY
- ServerAliveInterval
- LocalForward
- RemoteForward
- ClearAllForwardings
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.jcraft.jsch.ConfigRepository
ConfigRepository.Config -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Hashtableprivate final Vectorprivate static final HashtableFields inherited from interface com.jcraft.jsch.ConfigRepository
defaultConfig, nullConfig -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidstatic OpenSSHConfigParses the given string, and returns an instance of ConfigRepository.static OpenSSHConfigParses the given file, and returns an instance of ConfigRepository.
-
Field Details
-
config
-
hosts
-
keymap
-
-
Constructor Details
-
OpenSSHConfig
OpenSSHConfig(Reader r) throws IOException - Throws:
IOException
-
-
Method Details
-
parse
Parses the given string, and returns an instance of ConfigRepository.- Parameters:
conf- string, which includes OpenSSH's config- Returns:
- an instanceof OpenSSHConfig
- Throws:
IOException
-
parseFile
Parses the given file, and returns an instance of ConfigRepository.- Parameters:
file- OpenSSH's config file- Returns:
- an instanceof OpenSSHConfig
- Throws:
IOException
-
_parse
- Throws:
IOException
-
getConfig
- Specified by:
getConfigin interfaceConfigRepository
-