Solved

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

Posted on 2004-09-21
9
491 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
 
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
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…

705 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now