|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindbright.ssh.SSHInteractorAdapter
examples.SSH1Example
Examples on how to use the ssh1 classes.
- runWithPortFwd: starts SSH1 connection and port forwarding which is used to send and receive data over - runWithCommand: starts a command over an SSH1 connection and retrieves the output - runWithCommandInShell: start a shell over SSH1 connection and run a command in the shell and retrieve the output - runSCP: copy a file with SCP Run with: java SSH1Example
Method Summary | |
int |
getAliveInterval()
|
int[] |
getAuthTypes(SSHClientUser origin)
|
java.lang.String |
getChallengeResponse(SSHClientUser origin,
java.lang.String challenge)
|
int |
getCipher(SSHClientUser origin)
|
int |
getCompressionLevel()
|
java.lang.String |
getDisplay()
|
SSHRSAKeyFile |
getIdentityFile(SSHClientUser origin)
|
java.lang.String |
getIdentityPassword(SSHClientUser origin)
|
SSHInteractor |
getInteractor()
|
int |
getMaxPacketSz()
|
java.lang.String |
getPassword(SSHClientUser origin)
|
java.net.Socket |
getProxyConnection()
|
java.lang.String |
getSrvHost()
|
int |
getSrvPort()
|
java.lang.String |
getUsername(SSHClientUser origin)
|
static void |
main(java.lang.String[] argv)
|
void |
runSCP(java.lang.String remotefile)
Transfer files with SCP |
void |
runWithCommand(java.lang.String command)
Start a command over SSH1 connection and run a command and retrieve the output |
void |
runWithCommandInShell(java.lang.String command)
Start a shell over SSH1 connection and run a command and retrieve the output |
void |
runWithPortFwd()
Start an SSH1 connection with port forward. |
boolean |
verifyKnownHosts(RSAPublicKey hostPub)
|
boolean |
wantPTY()
|
boolean |
wantX11Forward()
|
Methods inherited from class com.mindbright.ssh.SSHInteractorAdapter |
alert, askConfirmation, connected, disconnected, isVerbose, licenseDialog, open, promptLine, promptPassword, propsStateChanged, quietPrompts, report, sessionStarted, startNewSession |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void runWithPortFwd() throws java.net.UnknownHostException, java.io.IOException
java.net.UnknownHostException
java.io.IOException
public void runWithCommand(java.lang.String command) throws java.io.IOException
command
- Command to execute
java.io.IOException
public void runWithCommandInShell(java.lang.String command) throws java.io.IOException
command
- Command to execute
java.io.IOException
public void runSCP(java.lang.String remotefile) throws java.io.IOException
remotefile
- File on remote system to transfer
java.io.IOException
public java.lang.String getUsername(SSHClientUser origin) throws java.io.IOException
getUsername
in interface SSHAuthenticator
java.io.IOException
public java.lang.String getPassword(SSHClientUser origin) throws java.io.IOException
getPassword
in interface SSHAuthenticator
java.io.IOException
public java.lang.String getChallengeResponse(SSHClientUser origin, java.lang.String challenge) throws java.io.IOException
getChallengeResponse
in interface SSHAuthenticator
java.io.IOException
public int[] getAuthTypes(SSHClientUser origin)
getAuthTypes
in interface SSHAuthenticator
public int getCipher(SSHClientUser origin)
getCipher
in interface SSHAuthenticator
public SSHRSAKeyFile getIdentityFile(SSHClientUser origin) throws java.io.IOException
getIdentityFile
in interface SSHAuthenticator
java.io.IOException
public java.lang.String getIdentityPassword(SSHClientUser origin) throws java.io.IOException
getIdentityPassword
in interface SSHAuthenticator
java.io.IOException
public boolean verifyKnownHosts(RSAPublicKey hostPub) throws java.io.IOException
verifyKnownHosts
in interface SSHAuthenticator
java.io.IOException
public java.lang.String getSrvHost() throws java.io.IOException
getSrvHost
in interface SSHClientUser
java.io.IOException
public int getSrvPort()
getSrvPort
in interface SSHClientUser
public java.net.Socket getProxyConnection() throws java.io.IOException
getProxyConnection
in interface SSHClientUser
java.io.IOException
public java.lang.String getDisplay()
getDisplay
in interface SSHClientUser
public int getMaxPacketSz()
getMaxPacketSz
in interface SSHClientUser
public int getAliveInterval()
getAliveInterval
in interface SSHClientUser
public int getCompressionLevel()
getCompressionLevel
in interface SSHClientUser
public boolean wantX11Forward()
wantX11Forward
in interface SSHClientUser
public boolean wantPTY()
wantPTY
in interface SSHClientUser
public SSHInteractor getInteractor()
getInteractor
in interface SSHClientUser
public static void main(java.lang.String[] argv)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |