com.jcraft.jsch
Class OpenSSHConfig
java.lang.Object
com.jcraft.jsch.OpenSSHConfig
- All Implemented Interfaces:
- ConfigRepository
public class OpenSSHConfig
- extends Object
- implements 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:
ConfigRepository
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parse
public static OpenSSHConfig parse(String conf)
throws IOException
- 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
public static OpenSSHConfig parseFile(String file)
throws IOException
- Parses the given file, and returns an instance of ConfigRepository.
- Parameters:
file
- OpenSSH's config file
- Returns:
- an instanceof OpenSSHConfig
- Throws:
IOException
getConfig
public ConfigRepository.Config getConfig(String host)
- Specified by:
getConfig
in interface ConfigRepository
Copyright © 2014 JCraft,Inc.. All Rights Reserved.