de.mud.jta.plugin
Class SSH
java.lang.Object
|
+--de.mud.jta.Plugin
|
+--de.mud.jta.plugin.SSH
- All Implemented Interfaces:
- FilterPlugin, VisualPlugin
- public class SSH
- extends Plugin
- implements FilterPlugin, VisualPlugin
Secure Shell plugin for the Java Telnet Application. This is a plugin
to be used instead of Telnet for secure remote terminal sessions over
insecure networks. The implementation uses code that was derived from
Cedric Gourio's implementation that used parts of the old Java
Telnet Applet. Have a look at the package de.mud.ssh for further information
about ssh or look at the official ssh homepage:
http://www.ssh.fi/.
Maintainer: Matthias L. Jugel
- Version:
- $Id: SSH.java,v 1.21 2002/06/23 22:52:03 marcus Exp $
- Author:
- Matthias L. Jugel, Marcus Meißner
Constructor Summary |
SSH(PluginBus bus,
java.lang.String id)
Create a new ssh plugin. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
source
protected FilterPlugin source
handler
protected SshIO handler
user
protected java.lang.String user
pass
protected java.lang.String pass
SSH
public SSH(PluginBus bus,
java.lang.String id)
- Create a new ssh plugin.
setFilterSource
public void setFilterSource(FilterPlugin source)
- Description copied from interface:
FilterPlugin
- Set the source plugin where we get our data from and where the data
sink (write) is. The actual data handling should be done in the
read() and write() methods.
- Specified by:
setFilterSource
in interface FilterPlugin
- Following copied from interface:
de.mud.jta.FilterPlugin
- Parameters:
source
- the data source
getFilterSource
public FilterPlugin getFilterSource()
- Specified by:
getFilterSource
in interface FilterPlugin
read
public int read(byte[] b)
throws java.io.IOException
- Read data from the backend and decrypt it. This is a buffering read
as the encrypted information is usually smaller than its decrypted
pendant. So it will not read from the backend as long as there is
data in the buffer.
- Specified by:
read
in interface FilterPlugin
- Parameters:
b
- the buffer where to read the decrypted data in- Returns:
- the amount of bytes actually read.
write
public void write(byte[] b)
throws java.io.IOException
- Write data to the back end. This hands the data over to the ssh
protocol handler who encrypts the information and writes it to
the actual back end pipe.
- Specified by:
write
in interface FilterPlugin
- Parameters:
b
- the unencrypted data to be encrypted and sent
getPluginVisual
public javax.swing.JComponent getPluginVisual()
- Description copied from interface:
VisualPlugin
- Get the visible components from the plugin.
- Specified by:
getPluginVisual
in interface VisualPlugin
- Following copied from interface:
de.mud.jta.VisualPlugin
- Returns:
- a component that represents the plugin
getPluginMenu
public javax.swing.JMenu getPluginMenu()
- Description copied from interface:
VisualPlugin
- Get the menu entry for this component.
- Specified by:
getPluginMenu
in interface VisualPlugin
- Following copied from interface:
de.mud.jta.VisualPlugin
- Returns:
- a menu that can be used to change the plugin state