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

SEE ALSO

104       Net::SSH2.
105

AUTHOR

107       David B. Robins, <dbrobins@cpan.org>
108
110       Copyright (C) 2005, 2006 by David B. Robins; all rights reserved.
111
112       This library is free software; you can redistribute it and/or modify it
113       under the same terms as Perl itself, either Perl version 5.8.0 or, at
114       your option, any later version of Perl 5 you may have available.
115
116
117
118perl v5.8.8                       2007-02-24             Net::SSH2::Channel(3)
Impressum