Re: [Bglug] Re: writing to another machine's /dev/ttyS0... how?

2006-12-07 15:00

On Mon, 11 Sep 2006 09:20:48 -0400
William Park wrote:

> Is there an easy way to write to /dev/ttyS0

I know of a kernel driver that allows setting up /devs as network transparent, but it's probably overkill and too complex for what you want.
Netcat is the quickest. I use it to transfer large amounts of data sometimes. An example:

You would probably run something like this:
remote machine with dumb terminal:
netcat -l -p 2000 -w 5 > /dev/ttyS0
(this 'listens' on port 2000 for data, then exits)

your machine:
cat "whatever" > netcat [ip_address] 2000
(sent in cleartext)

If you want security, wrap it in SSH (which has the advantage of being setup using password-less keys, if you wish). An example of using nc trough SSH:

Also check the nc manpage. I hope that helps.


Bglug mailing list