Search This Blog

Monday, August 22, 2011

The simplest way to print text and pdf files through ssh

If you want to print "b.pdf" to a remote Linux box connected to a printer, then

$ cat  b.pdf   |   ssh username@myserver.domain.com "lp -"

A script can be easier to use

#!/bin/bash
cat $1 |  ssh username@myserver.domain.com "lp -"

Here is a better guide:  http://docs.ocf.berkeley.edu/wiki/How_to_print_through_SSH

No comments:

Labels

Blog Archive