NAME

Rex::Interface::File::LibSSH - Rex remote file handle via Net::LibSSH exec channels

VERSION

version 0.003

DESCRIPTION

Rex::Interface::File::LibSSH implements Rex's remote file handle interface using Net::LibSSH exec channels.

Write modes (> and >>) open a channel running cat > or cat >> on the remote. Writes are streamed directly over the SSH connection and committed when close() is called.

Read mode (<) slurps the entire file via cat and buffers it locally; read() and seek() operate on the local buffer.

LIMITATIONS

Read-mode open holds the whole file in memory on both ends at open() time. read() and seek() then operate on that local buffer rather than the remote file, so seek past the buffered end returns no data. This is fine for config files but not appropriate for large files. A future implementation could stream through Net::LibSSH::Channel::read with an explicit length — read(undef) reads zero bytes, pass -1 or no argument to slurp.

SEE ALSO

Rex::Interface::Connection::LibSSH, Rex::Interface::Fs::LibSSH

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/rex-libssh/issues.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <getty@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.