Solved

How to print from Windows on a remote unix server accessible with ssh

Posted on 2004-09-21
9
500 Views
Last Modified: 2013-12-23
Not sure if this is the right channel... I have an XP workstation and I can ssh to a unix server with LJ 4100 attached. I used to be able to use LPD/IPP to print from Windows on the remote printer, but the latest security enhancements don't let any traffic through but ssh (and Windows file sharing). Now to print the files I have to print to file first, copy the file to the server, then print it from the unix command line. I'd like to be able to just print from Windows without the intermediate steps. Is this possible? I know how to use ssh to print a remote file on a local printer, but I have an opposite situation. Needless to say, I don't have any admin privileges on the server, only on my workstation.
0
Comment
Question by:sergeis
  • 4
  • 3
  • 2
9 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 12123957
Have you asked about having LPD or IPP access enabled? If the remote site allows windows file sharing I can't see how IPP would present a greater security risk.
0
 
LVL 1

Author Comment

by:sergeis
ID: 12124627
Even before, when IPP worked, to print I had to login to my own workstation as a limited user with exact same credentials as my remote account, due to the stupid way XP does IPP (can't be a different user, unlike for file sharing). And no, the sysadmin is not the friendly type, so I just want to try and work around them. Many gave up and set up their own little networks, but I can't afford a LJ of my own, and everybody else is now behind their own firewall, so the central server is the only one I can reach. So how about remote printing over ssh from Windows?

Points doubled...
0
 
LVL 40

Expert Comment

by:jlevie
ID: 12125005
I'm sorry, but I can't think of a way other than printing to a file, transfering that to the remote server and then executing the print command on the remote. You could, since SMB file sharing is allowed, simplify things by printing to a file on a share mapped from the remote. And I suppose you could run a "watcher script" on the remote that looks for the print file in a specified location, submits that job and then deletes the print file. If you ran that in the background it would be sort of a remote printer.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Expert Comment

by:chris_calabrese
ID: 12126708
Since SMB is allowed, then if the *nix server is running Samba, you could have the *nix admins setup a Samba share for the printer. That way it would look like a Windows server exporting a printer share to your PC.
0
 
LVL 1

Author Comment

by:sergeis
ID: 12128097
This may be an acceptable workaround. However, the sysadmin will definitely not spend his time creating a special samba printer share just for me. And I'm not about to start a remote printing support rally in this place. I just want to rpint without extra hassles. The sysadmin also frowns upon running your own infinite background script, even at nice -19. I guess a once-a-minute cron script wouldn't be that noticeable. Anyone cares to post one here, or suggest alternatives?
0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 12133426
Instead of a watcher script you could also kick off the script on the far end through SSH. If you're using PuTTY, for example, you could do this using PuTY's plink command-line interface. Package the plink call and the remote copy into a single batch script that you run after printing to a fixed-named file.
0
 
LVL 1

Author Comment

by:sergeis
ID: 12139559
Well, this defeats the purpose of transparent remmote printing. I might as well run ados or a cygwin script that logs in, copies the local file to remote machine, then prints, deletes and logs out... I guess I'd have to write the scripts myself. Any other suggestions?
0
 
LVL 40

Accepted Solution

by:
jlevie earned 400 total points
ID: 12139731
>  Well, this defeats the purpose of transparent remmote printing.

Quite true, but that's partly a result of your local system being windows and partly the result of an over-zealous and less-than-helpful SysAdmin. If the local system was a Linux or Unix system it would very easy to create a print filter that would transfer the file via scp, issue the ssh command to print it, and the delete the print file. That's a non-trivial task in windows. In a like manner the SysAdmin could be a bit more helpful and enable LPD/IPP or an SMB print share. We've just been trying to give you the least painful ways of working around the restrictions you face.
0
 
LVL 1

Author Comment

by:sergeis
ID: 12148288
Well, I have created a crontab entry, and it's working sufficiently well. Hope they don't disable my 1-min crontab...  Shouldn't be that noticeable? Thanks for the idea jlevie, even though I had to do my own thinking as well :).
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question