Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-09-21
9
Medium Priority
?
505 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
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 1200 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Make the most of your online learning experience.
How to fix a SonicWall Gateway Anti-Virus firewall blocking automatic updates to apps like Windows, Adobe, Symantec, etc.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

971 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