Package com.atlassian.bamboo.plugins.ssh
Class SshConfig
- java.lang.Object
-
- com.atlassian.bamboo.plugins.ssh.SshConfig
-
public class SshConfig extends Object
This class parses SSH config files in the same way that SSH client does.
-
-
Field Summary
Fields Modifier and Type Field Description static FileID_DSAstatic FileID_ECDSAstatic FileID_RSAstatic File[]KNOWN_PRIVATE_KEY_LOCATIONSstatic FileSSH_DIRECTORY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ProxyConnectionDataapply(ProxyConnectionData connectionData, @Nullable String defaultUserName)Returns newProxyConnectionDataobject with null values overridden with config variables.static SshConfiggetDefaultSshConfig()Collection<Pair<File,Long>>getParsedFiles()
-
-
-
Constructor Detail
-
SshConfig
public SshConfig(File... sshConfigs) throws IOException
- Parameters:
sshConfigs- SSH configs to parse, in order of importance- Throws:
IOException
-
-
Method Detail
-
apply
public ProxyConnectionData apply(ProxyConnectionData connectionData, @Nullable @Nullable String defaultUserName) throws IOException, GeneralSecurityException
Returns newProxyConnectionDataobject with null values overridden with config variables. If user name is not supplied in the connection data, it will be overriden with defaultUserName- Returns:
- Throws:
IOExceptionGeneralSecurityException
-
getDefaultSshConfig
public static SshConfig getDefaultSshConfig() throws IOException
- Throws:
IOException
-
getParsedFiles
public Collection<Pair<File,Long>> getParsedFiles()
-
-