0

On DOS we can:

NET USE LPT1: \\remote-pc\shared_printer
COPY file.txt > LPT1

I know on Linux I can print to local usb printer:

cat file.txt > /dev/usb/lp2

But how to print to a remote (Linux Shared Printer) AND to a (Windows Shared Printer) ?

Tks

1 Answer 1

0

On a Linux client, you could use lp when executed by ssh on the remote machine, as it can read from stdin data that is coming from outside the ssh call.

This might work:

cat file | ssh user@remotehost "lp -"

A more sophisticated script can be found on the Web Archive at SSH-LPR Backend for CUPS.


For accessing a Windows shared printer from Linux, see the post
How to connect from Linux to a Windows printer?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .