Live data from Hacker News

Fun with Kermit and ZMODEM over SSH

cambus.net

91–100 of 110 posts

Re: Fun with Kermit and ZMODEM over SSH

#91
post #75
post #4

Hello! Thank you for starting me up! I'm the Kermit protocol and I'm happy to hel... wait, you want to transfer what file? What the hell is a giga byte? Well, man, OK, you're the user so you know best, but man, this is going to take like, days man, settle in, here we gooo ooooooo whooooooo OOOOOOOOO AAAAAAAAAAAAAAA !!!!!!!!!!1!! qcjqrjrcorRC!!! WHAT THE HECK WAS THAT? Did I just do megabytes per second ? Holy shit. A…

My Commodore 64 has a USB interface nowadays (and a few replaced caps). Originally it only had a tape "drive" ie cassette. After a few years we got a 1541 floppy disc unit. Tick, tick tick, whiirrrrrrrr (think: trilled r on speed), fut (etc). Instead of 10-15 mins to load a game it loaded in a fair few seconds. Bear in mind that the 64 refers to 64 kilobytes. $ ls -lh /usr/bin/cp -rwxr-xr-x 1 root root 123K Apr 3 19:…

just the "cp --help" is around 5k (uncompressed)

Re: Fun with Kermit and ZMODEM over SSH

#92

Still would love if desktop terminal emulators would implement the zmodem receiver side, so that you can ssh into some host of your choice and just type "sz" to copy arbitrary files of your choice onto your local system.

screen supports zmodem if you have lrzsz installed. Just put "zmodem catch" into your ~/.screenrc , then ssh while in screen and execute sz/rz on the remote end. screen will automatically recognize the control sequence and prompt with a completed sz/rz command - enter executes and sends/receives the file.

Re: Fun with Kermit and ZMODEM over SSH

#93
post #83

Earlier quoted context omitted.

I used both of those, as well as ProComm Plus (PCPLUS.EXE). Thanks for the trip down memory lane!!!

I used all those as well. But I also learned that many experts on the BBSes use Commo. I'm too young to appreciate complexity of Commo at that time.

Oh wait. There's Telemate as well. My all time favorite.

Re: Fun with Kermit and ZMODEM over SSH

#94
post #11

My only source of internet in undergrad was dialing into my university's modem pool and getting a shell on the main server (a DEC Alpha running OSF/1). Browsing the web was done through lynx. That worked fine but every now and then, a site would have some inline image that I'd want to see, so I'd view source to get the img URL and then download that to /tmp and transfer the file to my local machine via zmodem. Usuall…

You might have been interested in SLiRP[0] at the time.

[0] https://en.wikipedia.org/wiki/Slirp

Re: Fun with Kermit and ZMODEM over SSH

#95
post #75
post #4

Hello! Thank you for starting me up! I'm the Kermit protocol and I'm happy to hel... wait, you want to transfer what file? What the hell is a giga byte? Well, man, OK, you're the user so you know best, but man, this is going to take like, days man, settle in, here we gooo ooooooo whooooooo OOOOOOOOO AAAAAAAAAAAAAAA !!!!!!!!!!1!! qcjqrjrcorRC!!! WHAT THE HECK WAS THAT? Did I just do megabytes per second ? Holy shit. A…

My Commodore 64 has a USB interface nowadays (and a few replaced caps). Originally it only had a tape "drive" ie cassette. After a few years we got a 1541 floppy disc unit. Tick, tick tick, whiirrrrrrrr (think: trilled r on speed), fut (etc). Instead of 10-15 mins to load a game it loaded in a fair few seconds. Bear in mind that the 64 refers to 64 kilobytes. $ ls -lh /usr/bin/cp -rwxr-xr-x 1 root root 123K Apr 3 19:…

What's in that initrd. Surely busybox doesn't take up 14M.

Re: Fun with Kermit and ZMODEM over SSH

#96
post #93
post #83

Earlier quoted context omitted.

I used all those as well. But I also learned that many experts on the BBSes use Commo. I'm too young to appreciate complexity of Commo at that time.

Oh wait. There's Telemate as well. My all time favorite.

Commo and TeleMate!! That's right! I think I just found my long lost brother! :-) Thanks again. (And yes, TeleMate was my favorite too. I remember it came on 4 x 1.44MB floppies and had a kick-ass scripting language. It was all about the macros and automation back then!)

Re: Fun with Kermit and ZMODEM over SSH

#97

Earlier quoted context omitted.

The whole protocol does. IIRC you basically have to get a Kermit prompt and issue your commands to the server. Which is easy if you use an actual Kermit client, like Columbia put out (though apparently for the last 12 years it's been an independent project no longer affiliated with the university), but most people just used the internal version that came with their terminal program - with the primary effect being tha…

Since I can't edit, I'll reply to myself: The default of "always work" is amply demonstrated by the fact that Kermit is available for CP/M, and can be compiled on a working CP/M-80 system from .HEX files that you just blast over the serial port. Obviously, due to system constraints, this is not a fully modern Kermit. But it works. And if you want error checking and reliable file transfer on a Kaypro, it's not a bad w…

There was also short BASIC programs that could be readily keyed in that supported the basic lowest common denominator of the Kermit protocol. The goal being to key that in, and use it to transfer and bootstrap a better version of Kermit.

Re: Fun with Kermit and ZMODEM over SSH

#98
post #66

I never thought, I'd read again about ZMODEM and Kermit. To learn programming and dive more into C/C++, I implemented both protocols while writing a Windows application to transfer files from the PC to a HP48 graphics calculator over the serial port in ca. 1999. This app then became the "official" PC link program "HPComm", released under the GPL. Almost 25 years go... :-o https://hpcomm.sourceforge.net/index-old.html

Kermit was a hidden gem on the HP-48.

Company I was doing work for was looking at handheld solutions for on site data collection. One of the things they were looking at was something from Symbol. Nice unit, but, $2k a pop.

I was out visiting my father who happened to have an HP-48, which I had not seen before.

Fiddling with it I managed to learn quite a bit about its (now legendary) capabilities. But I was quite surprised to learn it had a serial port and support for Kermit.

Returning home, I bought one and quickly prototyped a solution for the company, where they’d upload the data from the calculators each day straight to the HP-9000 via Kermit.

You could buy the HP-48 base model for $100, and they ran forever on AAA batteries. We ended up rolling out the project and they bought a dozen of them.

That was a really fun project. I coded much of the calculator code lying in bed.

Re: Fun with Kermit and ZMODEM over SSH

#99
post #30

At my last job, I worked in the PCI cardholder data environment, and we were very careful to limit egress from our systems in order to make it hard to exfiltrate data in the unlikely event of a breach. I remember thinking, if I were a wily hacker and I managed to pop a shell on one of these hosts, I would not be deterred by network egress roadblocks. I'd figure out a way to get `sz` on to a host and exfiltrate data t…

> I'd figure out a way to get `sz` on to a host and exfiltrate data to my heart's content with ZMODEM like we did back in the day. Probably as easy as `cat > sz` and then paste it over the wire? Maybe run through base64 first. Although actually depending on the situation you might be able to just do that directly and not bother with this? Like just as a super simple non-scientific test: $ ssh someserver cat /bin/ls >…

In my DOS days, I used a simple text file that was meant to load into MSDOS' debug program to create a uudecode program. For things like laptops that came with MSDOS, nothing else, and no other way to load things on them. You could use type with a comport I believe to save the code to a txt file and then using debug create an executable binary. Here's one such program: http://www.u.arizona.edu/~shunter/uud.txt

Then I'd use type to save a uuencoded version of something like minicom on the laptop, use this program to uudecode it, and then use minicom to download anything else (Windows 95 install files?) using zmodem.

Re: Fun with Kermit and ZMODEM over SSH

#100
post #34

Earlier quoted context omitted.

> I'd figure out a way to get `sz` on to a host and exfiltrate data to my heart's content with ZMODEM like we did back in the day. Probably as easy as `cat > sz` and then paste it over the wire? Maybe run through base64 first. Although actually depending on the situation you might be able to just do that directly and not bother with this? Like just as a super simple non-scientific test: $ ssh someserver cat /bin/ls >…

A related trick that can be actually useful is tar'ing on one side and untar'ing on the other: https://unix.stackexchange.com/questions/19804/compress-a-di... scp is miserably slow on transferring lots of small files and this can be wildly faster, plus you get your choice of compression program based on what is on each side of the connection and what the bandwidth vs. CPU is.

In the early days of Unix (before rcp was a given), tar pipelines were a common way of moving ) from one machine to another on the network. It was a little nicer than FTP, not only because it didn't need an admin to set up the FT server, but also because you could transfer the files to any directory that you could cd to and had write access to. (And of course, tar made it easy to send a bunch of files and directories at once, too...)
Post reply on HN