|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindbright.ssh2.SSH2SimpleClient
This class implements the most basic variant of a ssh2 client. It
creates the userauth, and connection layers (i.e. instances of
SSH2UserAuth
, and SSH2Connection
). The
only thing which needs to be provided is an initialized
SSH2Transport
instance, user authentication data. The
constructor is active in that it does all the required work to set
up the complete protocol stack, hence it can throw exceptions which
can occur.
This simple client can easily be used as the basis for example to build
tunneling capabilities into any java app. requiring secure connections. For
doing remote command execution and/or controlling input/output of a command
or shell the class SSH2ConsoleRemote
can be used to have easy
access to command execution and/or input/output as
java.io.InputStream
and java.io.OutpuStream
SSH2Transport
,
SSH2Connection
,
SSH2ConsoleRemote
,
SSH2Preferences
,
RunRemoteCommand
,
RemoteShellScript
Field Summary | |
protected SSH2Connection |
connection
|
protected SSH2Transport |
transport
|
protected SSH2UserAuth |
userAuth
|
Constructor Summary | |
SSH2SimpleClient(SSH2Transport transport,
SSH2Authenticator authenticator)
Constructor to use when more than one authentication method need to be used and/or other methods than the ones supported above. |
|
SSH2SimpleClient(SSH2Transport transport,
java.lang.String username,
SSH2Interactor interactor)
Constructor to use for keyboard interactive authentication. |
|
SSH2SimpleClient(SSH2Transport transport,
java.lang.String username,
java.lang.String password)
Simple constructor to use for password authentication. |
|
SSH2SimpleClient(SSH2Transport transport,
java.lang.String username,
java.lang.String keyFile,
java.lang.String keyPassword)
Simple constructor to use for publickey authentication. |
Method Summary | |
SSH2Connection |
getConnection()
|
SSH2Transport |
getTransport()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected SSH2Transport transport
protected SSH2Connection connection
protected SSH2UserAuth userAuth
Constructor Detail |
public SSH2SimpleClient(SSH2Transport transport, java.lang.String username, java.lang.String password) throws SSH2Exception
transport
- connected transport layerusername
- name of userpassword
- password of userSSH2Transport
public SSH2SimpleClient(SSH2Transport transport, java.lang.String username, java.lang.String keyFile, java.lang.String keyPassword) throws SSH2Exception, java.io.IOException
transport
- connected transport layerusername
- name of userkeyFile
- name of private key file to use for authenticationkeyPassword
- password protecting private key file (null if none)SSH2Transport
public SSH2SimpleClient(SSH2Transport transport, java.lang.String username, SSH2Interactor interactor) throws SSH2Exception
transport
- connected transport layerusername
- name of userinteractor
- interactor instance to handle user
interaction in authenticationSSH2Transport
public SSH2SimpleClient(SSH2Transport transport, SSH2Authenticator authenticator) throws SSH2Exception
transport
- connected transport layerauthenticator
- authenticator instance prepared with needed methodsSSH2Transport
Method Detail |
public SSH2Transport getTransport()
public SSH2Connection getConnection()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |