Net_SSH1
[ class tree: Net_SSH1 ] [ index: Net_SSH1 ] [ all elements ]

Procedural File: SSH1.php

Source Location: /lib/3rdParty/phpseclib/Net/SSH1.php



Classes:

Net_SSH1
Pure-PHP implementation of SSHv1.


Page Details:

Pure-PHP implementation of SSHv1.

PHP versions 4 and 5

Here's a short example of how to use this library:

  1.  <?php
  2.     include('Net/SSH1.php');
  3.  
  4.     $ssh new Net_SSH1('www.domain.tld');
  5.     if (!$ssh->login('username''password')) {
  6.         exit('Login Failed');
  7.     }
  8.  
  9.     echo $ssh->exec('ls -la');
  10.  ?>

Here's another short example:

  1.  <?php
  2.     include('Net/SSH1.php');
  3.  
  4.     $ssh new Net_SSH1('www.domain.tld');
  5.     if (!$ssh->login('username''password')) {
  6.         exit('Login Failed');
  7.     }
  8.  
  9.     echo $ssh->read('username@username:~$');
  10.     $ssh->write("ls -la\n");
  11.     echo $ssh->read('username@username:~$');
  12.  ?>

More information on the SSHv1 specification can be found by reading protocol-1.5.txt.

LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.




Tags:

author:  Jim Wigginton <terrafrost@php.net>
version:  $Id: SSH1.php,v 1.2 2011/05/19 18:02:11 gruberroland Exp $
copyright:  MMVII Jim Wigginton
link:  http://phpseclib.sourceforge.net
license:  MIT License


Includes:

require_once('Crypt/RC4.php') [line 94]
Include Crypt_RC4

require_once('Crypt/Random.php') [line 99]
Include Crypt_Random

require_once('Math/BigInteger.php') [line 74]
Include Math_BigInteger

Used to do RSA encryption.


require_once('Crypt/DES.php') [line 84]
Include Crypt_DES

require_once('Crypt/TripleDES.php') [line 89]
Include Crypt_TripleDES






NET_SSH1_AUTH_PASSWORD [line 180]

NET_SSH1_AUTH_PASSWORD = 3
password authentication

Authentication Methods

This is the only method that is supported by this library.




Tags:

see:  Net_SSH1::getSupportedAuthentications()
access:  public

[ Top ]



NET_SSH1_AUTH_RHOSTS [line 170]

NET_SSH1_AUTH_RHOSTS = 1
.rhosts or /etc/hosts.equiv

Authentication Methods




Tags:

see:  Net_SSH1::getSupportedAuthentications()
access:  public

[ Top ]



NET_SSH1_AUTH_RHOSTS_RSA [line 184]

NET_SSH1_AUTH_RHOSTS_RSA = 4
.rhosts with RSA host authentication

Authentication Methods




Tags:

see:  Net_SSH1::getSupportedAuthentications()
access:  public

[ Top ]



NET_SSH1_AUTH_RSA [line 174]

NET_SSH1_AUTH_RSA = 2
pure RSA authentication

Authentication Methods




Tags:

see:  Net_SSH1::getSupportedAuthentications()
access:  public

[ Top ]



NET_SSH1_CIPHER_3DES [line 128]

NET_SSH1_CIPHER_3DES = 3
Triple-DES in CBC mode

Encryption Methods

All implementations are required to support this




Tags:

see:  Net_SSH1::getSupportedCiphers()
access:  public

[ Top ]



NET_SSH1_CIPHER_BLOWFISH [line 158]

NET_SSH1_CIPHER_BLOWFISH = 6
Blowfish

Encryption Methods

Not supported nor is it defined in the official SSH1 specs. OpenSSH, however, defines it (see cipher.h) and uses it (see cipher.c)




Tags:

see:  Net_SSH1::getSupportedCiphers()
access:  public

[ Top ]



NET_SSH1_CIPHER_BROKEN_TSS [line 135]

NET_SSH1_CIPHER_BROKEN_TSS = 4
TRI's Simple Stream encryption CBC

Encryption Methods

Not supported nor is it defined in the official SSH1 specs. OpenSSH, however, does define it (see cipher.h), although it doesn't use it (see cipher.c)




Tags:

see:  Net_SSH1::getSupportedCiphers()
access:  public

[ Top ]



NET_SSH1_CIPHER_DES [line 122]

NET_SSH1_CIPHER_DES = 2
DES in CBC mode

Encryption Methods




Tags:

see:  Net_SSH1::getSupportedCiphers()
access:  public

[ Top ]



NET_SSH1_CIPHER_IDEA [line 118]

NET_SSH1_CIPHER_IDEA = 1
IDEA in CFB mode

Encryption Methods

Not supported.




Tags:

see:  Net_SSH1::getSupportedCiphers()
access:  public

[ Top ]



NET_SSH1_CIPHER_NONE [line 112]

NET_SSH1_CIPHER_NONE = 0
No encryption

Encryption Methods

Not supported.




Tags:

see:  Net_SSH1::getSupportedCiphers()
access:  public

[ Top ]



NET_SSH1_CIPHER_RC4 [line 151]

NET_SSH1_CIPHER_RC4 = 5
RC4

Encryption Methods

Not supported.




Tags:

see:  Net_SSH1::getSupportedCiphers()
access:  public

[ Top ]



NET_SSH1_LOG_COMPLEX [line 234]

NET_SSH1_LOG_COMPLEX = 2
Returns the message content



Tags:

see:  Net_SSH1::getLog()
access:  public

[ Top ]



NET_SSH1_LOG_SIMPLE [line 230]

NET_SSH1_LOG_SIMPLE = 1
Returns the message numbers



Tags:

see:  Net_SSH1::getLog()
access:  public

[ Top ]



NET_SSH1_READ_REGEX [line 248]

NET_SSH1_READ_REGEX = 2
Returns when a string matching the regular expression $expect is found



Tags:

see:  Net_SSH1::read()
access:  public

[ Top ]



NET_SSH1_READ_SIMPLE [line 244]

NET_SSH1_READ_SIMPLE = 1
Returns when a string matching $expect exactly is found



Tags:

see:  Net_SSH1::read()
access:  public

[ Top ]




Documentation generated on Tue, 09 Aug 2011 19:18:49 +0200 by phpDocumentor 1.4.1