de.mud.jta.plugin

Class SSH

Implemented Interfaces:
FilterPlugin, VisualPlugin

public class SSH
extends Plugin
implements FilterPlugin, VisualPlugin

Secure Shell plugin for the JTA. This is a plugin to be used instead of Telnet for secure remote terminal sessions over insecure networks. Take 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 513 2005-12-19 07:59:45Z leo $
Author:
Matthias L. Jugel, Marcus Mei???ner

Field Summary

protected SshIO
handler
protected String
pass
protected FilterPlugin
source
protected String
user

Fields inherited from class de.mud.jta.Plugin

bus, id

Constructor Summary

SSH(PluginBus bus, String id)
Create a new ssh plugin.

Method Summary

FilterPlugin
getFilterSource()
JMenu
getPluginMenu()
JComponent
getPluginVisual()
int
read(byte[] b)
Read data from the backend and decrypt it.
void
setFilterSource(FilterPlugin source)
void
write(byte[] b)
Write data to the back end.

Methods inherited from class de.mud.jta.Plugin

error, getId

Field Details

handler

protected SshIO handler

pass

protected String pass

source

protected FilterPlugin source

user

protected String user

Constructor Details

SSH

public SSH(PluginBus bus,
           String id)
Create a new ssh plugin.

Method Details

getFilterSource

public FilterPlugin getFilterSource()
Specified by:
getFilterSource in interface FilterPlugin

getPluginMenu

public JMenu getPluginMenu()
Specified by:
getPluginMenu in interface VisualPlugin

getPluginVisual

public JComponent getPluginVisual()
Specified by:
getPluginVisual in interface VisualPlugin

read

public int read(byte[] b)
            throws 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.

setFilterSource

public void setFilterSource(FilterPlugin source)
Specified by:
setFilterSource in interface FilterPlugin

write

public void write(byte[] b)
            throws 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