1Net::SSH2::Channel(3) User Contributed Perl DocumentationNet::SSH2::Channel(3)
2
3
4

NAME

6       Net::SSH2::Channel - SSH 2 channel object
7

DESCRIPTION

9       A channel object is created by the Net::SSH2 "channel" method.  As well
10       as being an object, it is also a tied filehandle.  The Net::SSH2 "poll"
11       method can be used to check for read/write availability and other
12       conditions.
13
14   setenv ( key, value ... )
15       Sets remote environment variables.  Note that most implementations do
16       not allow environment variables to be freely set.  Pass in a list of
17       keys and values with the values to set.  Returns the number of
18       successful sets.
19
20   blocking ( flag )
21       Enable or disable blocking.  Note that this is currently implemented in
22       libssh2 by setting a per-session flag; it's equivalent to
23       Net::SSH2::blocking.
24
25   eof
26       Returns true if the remote server sent an EOF.
27
28   send_eof
29       Send an EOF to the remote.  After an EOF has been sent, no more data
30       may be sent; the connection should be closed.
31
32   close
33       Close the channel (happens automatically on object destruction).
34
35   wait_closed
36       Wait for a remote close event.  Must have already seen remote EOF.
37
38   exit_status
39       Returns the channel's program exit status.
40
41   pty ( terminal [, modes [, width [, height ]]] )
42       Request a terminal on a channel.  If provided, "width" and "height" are
43       the width and height in characters (defaults to 80x24); if negative
44       their absolute values specify width and height in pixels.
45
46   pty_size ( width, height )
47       Request a terminal size change on a channel. "width" and "height" are
48       the width and height in characters; if negative their absolute values
49       specify width and height in pixels.
50
51   process ( request, message )
52       Start a process on the channel.  See also shell, exec, subsystem.
53
54   shell
55       Start a shell on the remote host; calls process("shell").
56
57   exec ( command )
58       Execute the command on the remote host; calls process("exec", command).
59       Note that only one of these requests can succeed per channel (cp.
60       "exec" in perlfunc); if you want to run a series of commands, consider
61       using shell instead.
62
63   subsystem ( name )
64       Run subsystem on the remote host; calls process("subsystem", command).
65
66   ext_data ( mode )
67       Set extended data handling mode:
68
69       normal (default)
70           Keep data in separate channels; stderr is read separately.
71
72       ignore
73           Ignore all extended data.
74
75       merge
76           Merge into the regular channel.
77
78   read ( buffer, size [, ext ] )
79       Attempts to read size bytes into the buffer.  Returns number of bytes
80       read, undef on failure.  If ext is present and set, reads from the
81       extended data channel (stderr).
82
83   write ( buffer [, ext ] )
84       Attempts to write the buffer to the channel.  Returns number of bytes
85       written, undef on failure.  If ext is present and set, writes to the
86       extended data channel (stderr).
87
88   flush ( [ ext ] )
89       Flushes the channel; if ext is present and set, flushes extended data
90       channel.  Returns number of bytes flushed, undef on error.
91

SEE ALSO

93       Net::SSH2.
94

AUTHOR

96       David B. Robins, <dbrobins@cpan.org>
97
99       Copyright (C) 2005, 2006 by David B. Robins; all rights reserved.
100
101       This library is free software; you can redistribute it and/or modify it
102       under the same terms as Perl itself, either Perl version 5.8.0 or, at
103       your option, any later version of Perl 5 you may have available.
104
105
106
107perl v5.12.3                      2009-08-20             Net::SSH2::Channel(3)
Impressum