com.jcraft.jsch
Class JSch

java.lang.Object
  extended by com.jcraft.jsch.JSch

public class JSch
extends java.lang.Object


Constructor Summary
JSch()
           
 
Method Summary
 void addIdentity(Identity identity, byte[] passphrase)
           
 void addIdentity(java.lang.String prvkey)
           
 void addIdentity(java.lang.String prvkey, byte[] passphrase)
           
 void addIdentity(java.lang.String name, byte[] prvkey, byte[] pubkey, byte[] passphrase)
           
 void addIdentity(java.lang.String prvkey, java.lang.String passphrase)
           
 void addIdentity(java.lang.String prvkey, java.lang.String pubkey, byte[] passphrase)
           
protected  void addSession(Session session)
           
static java.lang.String getConfig(java.lang.String key)
           
 HostKeyRepository getHostKeyRepository()
           
 java.util.Vector getIdentityNames()
           
 Session getSession(java.lang.String username, java.lang.String host)
           
 Session getSession(java.lang.String username, java.lang.String host, int port)
           
 void removeAllIdentity()
           
 void removeIdentity(java.lang.String name)
           
protected  boolean removeSession(Session session)
           
static void setConfig(java.util.Hashtable newconf)
           
static void setConfig(java.lang.String key, java.lang.String value)
           
 void setHostKeyRepository(HostKeyRepository hkrepo)
           
 void setKnownHosts(java.io.InputStream stream)
           
 void setKnownHosts(java.lang.String filename)
           
static void setLogger(Logger logger)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSch

public JSch()
Method Detail

getSession

public Session getSession(java.lang.String username,
                          java.lang.String host)
                   throws JSchException
Throws:
JSchException

getSession

public Session getSession(java.lang.String username,
                          java.lang.String host,
                          int port)
                   throws JSchException
Throws:
JSchException

addSession

protected void addSession(Session session)

removeSession

protected boolean removeSession(Session session)

setHostKeyRepository

public void setHostKeyRepository(HostKeyRepository hkrepo)

setKnownHosts

public void setKnownHosts(java.lang.String filename)
                   throws JSchException
Throws:
JSchException

setKnownHosts

public void setKnownHosts(java.io.InputStream stream)
                   throws JSchException
Throws:
JSchException

getHostKeyRepository

public HostKeyRepository getHostKeyRepository()

addIdentity

public void addIdentity(java.lang.String prvkey)
                 throws JSchException
Throws:
JSchException

addIdentity

public void addIdentity(java.lang.String prvkey,
                        java.lang.String passphrase)
                 throws JSchException
Throws:
JSchException

addIdentity

public void addIdentity(java.lang.String prvkey,
                        byte[] passphrase)
                 throws JSchException
Throws:
JSchException

addIdentity

public void addIdentity(java.lang.String prvkey,
                        java.lang.String pubkey,
                        byte[] passphrase)
                 throws JSchException
Throws:
JSchException

addIdentity

public void addIdentity(java.lang.String name,
                        byte[] prvkey,
                        byte[] pubkey,
                        byte[] passphrase)
                 throws JSchException
Throws:
JSchException

addIdentity

public void addIdentity(Identity identity,
                        byte[] passphrase)
                 throws JSchException
Throws:
JSchException

removeIdentity

public void removeIdentity(java.lang.String name)
                    throws JSchException
Throws:
JSchException

getIdentityNames

public java.util.Vector getIdentityNames()
                                  throws JSchException
Throws:
JSchException

removeAllIdentity

public void removeAllIdentity()
                       throws JSchException
Throws:
JSchException

getConfig

public static java.lang.String getConfig(java.lang.String key)

setConfig

public static void setConfig(java.util.Hashtable newconf)

setConfig

public static void setConfig(java.lang.String key,
                             java.lang.String value)

setLogger

public static void setLogger(Logger logger)