NAME

Net::SSH::Perl::SSH1 - SSH1 implementation

SYNOPSIS

use Net::SSH::Perl;
my $ssh = Net::SSH::Perl->new($host, protocol => 1);

DESCRIPTION

Net::SSH::Perl::SSH1 implements the SSH1 protocol. It is a subclass of Net::SSH::Perl, and implements the interface described in the documentation for that module. In fact, your usage of this module should be completely transparent; simply specify the proper protocol value (1) when creating your Net::SSH::Perl object, and the SSH1 implementation will be loaded automatically.

NOTE: Of course, this is still subject to protocol negotiation with the server; if the server doesn't support SSH1, there's not much the client can do, and you'll get a fatal error if you use the above protocol specification (1).

USAGE

Net::SSH::Perl::SSH1 shares the interface described by Net::SSH::Perl. In addition, you can call the following "advanced" methods on a Net::SSH::Perl::SSH1 object, that do not apply to a regular Net::SSH::Perl object.

$ssh->set_cipher($cipher_name)

Sets the cipher for the SSH session $ssh to $cipher_name (which must be a valid cipher name), and turns on encryption for that session.

$ssh->send_cipher

Returns the "send" cipher object. This is the object that encrypts outgoing data.

If it's not defined, encryption is not turned on for the session.

$ssh->receive_cipher

Returns the "receive" cipher object. This is the object that decrypts incoming data.

If it's not defined, encryption is not turned on for the session.

NOTE: the send and receive ciphers and two different objects, each with its own internal state (initialization vector, in particular). Thus they cannot be interchanged.

$ssh->compression([ $level ])

Without arguments, returns the current compression level for the session. If given an argument $level, sets the compression level and turns on compression for the session.

Note that this should not be used to turn compression off. In fact, I don't think there's a way to turn compression off. But in other words, don't try giving this method a value of 0 and expect that to turn off compression. It won't.

If the return value of this method is undefined or 0, compression is turned off.

$ssh->session_key

Returns the session key, which is simply 32 bytes of random data and is used as the encryption/decryption key.

AUTHOR & COPYRIGHTS

Please see the Net::SSH::Perl manpage for author, copyright, and license information.