I've recently extracted the Z-modem file transfer routines from BInktermPHP into its own PHP package available via composer. The library provides simple methods for sending and receiving files, with or without IAC escaping for use over Telnet and also includes two helper rz and sz php scripts.
Available from: https://github.com/awehttam/zmodem-php or via composer using composer require awehttam/zmodem-php
Why Z-modem for transfering files? Unlike scp, this requires no separate connection, port, or subsystem; the file transfer happens inline with your existing session. zmodem-php provides a convenient method for sending and receiving data through an existing interactive ssh or telnet session without requiring a third party client such as SCP, and ability to cross multiple hops.
Of course you'd need a z-modem capable client. For that you might wish to use Zoc, SecureCRT, TeraTerm, or even SyncTerm on your local terminal..
Leave a Comment
No comments yet. Be the first to comment!