com.atlassian.bamboo.plugins.ssh
Class SshConfig

java.lang.Object
  extended by 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
static File ID_DSA
           
static File ID_ECDSA
           
static File ID_RSA
           
static File[] KNOWN_PRIVATE_KEY_LOCATIONS
           
static File SSH_DIRECTORY
           
 
Constructor Summary
SshConfig(File... sshConfigs)
           
 
Method Summary
 ProxyConnectionData apply(ProxyConnectionData connectionData, String defaultUserName)
          Returns new ProxyConnectionData object with null values overridden with config variables.
static SshConfig getDefaultSshConfig()
           
 Collection<Pair<File,Long>> getParsedFiles()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SSH_DIRECTORY

public static final File SSH_DIRECTORY

ID_RSA

public static final File ID_RSA

ID_DSA

public static final File ID_DSA

ID_ECDSA

public static final File ID_ECDSA

KNOWN_PRIVATE_KEY_LOCATIONS

public static final File[] KNOWN_PRIVATE_KEY_LOCATIONS
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
                                 String defaultUserName)
                          throws IOException
Returns new ProxyConnectionData object 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:
IOException

getDefaultSshConfig

public static SshConfig getDefaultSshConfig()
                                     throws IOException
Throws:
IOException

getParsedFiles

public Collection<Pair<File,Long>> getParsedFiles()


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.