Monday 4 January 2016

Remotely printing on a printer behind a firewall...

Printing...


Today I needed to print something at home. My wife was there and she needed the document but didn't have a way of printing it herself.

So, how do you go about doing this? Well, there's probably a few ways, like creating a print queue using a shared drive and having a print server at home that checks that queue. Then you can upload the file to dropbox, gdrive or where ever you've shared the directory and get that printed.

But what if you haven't set that up yet? Well, depending on the printer and if you have a server/desktop with ssh running, you could tunnel it.

sudo ssh user@ext.er.nal.ip -L 161:pri.nt.er.ip:161 -L 162:pri.nt.er.ip:162 -L 9100:pri.nt.er.ip:9100 

Obviously substitute your external IP with the IP to get to your ssh box and the printer IP with the one for the printer you're trying to use.

This command by the way is for printing to an HP printer and worked fine for me!

-P

No comments: