But don’t worry, the YouTube clip at the end of today’s post will have nothing to do with skin conditions. Today’s little adventure in nostalgia posting comes courtesy of a bridge call that I was asked to join so that we could troubleshoot a systems integration issue. The short story is that a process running on one server has to make a remote shell call to a process running on another, and it wasn’t.
To test things out, it became necessary to install an RSHd on the Windows server, and an RSH client on my Windows 7 workstation, so that I could verify that the communications pathways were there. Of course, MSFT has not included an rsh client since XP, and the RSHd service is now a part of a much larger Services for Unix. Not wanting to go there on the server, and not having an XP workstation at hand, I needed to find a quick way to make this work. I did.
Server
Mike Dubman created a Windows RSH daemon and posted it on SourceForge. It is a zip file to download and extract and it includes a simple self-contained binary as well as the source. You can run the RSHd as an application, or install it as a service. To get a listener running without an install and without having to create an .rhosts file, open a cmd prompt in the extracted directory and run
rshd –d –r [enter]
That is all you need to do to get a listener running for testing. Dubman’s page includes the documentation on installing it as a service, which is an option if you need it.
Client
Bryan Chafy over at Northeastern University ported the RSH client over to Windows. You can get the rsh executable, along with source, here. It runs in a cmd prompt just like any other rsh client. Open a cmd prompt in the directory where you extracted the file (I copied it to my cmdlinetools directory, as previously mentioned here) and away you go. To give you a feel for it, say I want to execute the hostname cmd to test things out against the server fileserver1.
rsh fileserver1 hostname [enter]
You should see fileserver1 in the response. You can also use the ip.addr instead of the name if you choose.
(in)Security
Just remember that remote shell offers no encryption, and without an .rhosts file, it basically just assumes that you are who you say. Usernames are transmitted in the clear, and there is no authentication. Your command, and the account you use to execute it, will cross the wire in the clear, as will any response. This is not to be considered a replacement for SSH, or PowerShell, but when you have to use it for cross-platform/legacy purposes, it’s nice to be able to have something that just works.
RSH clients use TCP 1023 as the source port, and this RSHd expects that, and will not accept connections from higher ports. If you are connecting through NAT (and we all know how much I lurve NAT) you’re going to get spanked with an "Permission denied by rshd." I’ve got no help for you with this…I hate NAT, and there are some protocols that just won’t work through it.
Using CLI tools always reminds me of old-school hacking, and how laughable it is when movies and TV shows try to show it in 30 second blips. While I lurved "The Matrix," this vid from CollegeHumor just rocks. If you have to enable an insecure interface to your server, this might make you feel a little better about doing it…well, this, and a tall cold one. Hope you have cookies enabled!
Direct link for RSS and email subscribers…http://www.collegehumor.com/video:1886349
You might also enjoy:





