This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
I have a rmi application that uses a socket factory to encrypt communication between the client/server. There is no dynamic class loading the stub is with the client. Everything works fine. Now I want to my my server code to a machine that only has port 22 open for communication to the outside world. It has implement a ssh public/private scheme. Is there any way I can use that existing port???
Now I want to my my server code to a machine that only has port 22 open for communication to the outside world.
I assume this to mean that the firewall protecting this machine only allows ssh access from the outside world, and this server has sshd installed. The quick answer is to say use a SSH tunnel. It is supported by all ssh implementations (mindterm springs to mind if you want a java implementation that you can use programatically). Details about ssh tunneling can be found on the web
I have no java certifications. This makes me a bad programmer. Ignore my post.
BTW, if want to know the command to forward pt1 of local machine to pt2 of remote machine rm_name, then the command is:
You can have multiple -L options, but I don't think you can have a wild card for port number. So, you will have to specify a fixed port no. in the constructor of the RMI Implementation class. [ September 24, 2003: Message edited by: Pankaj Kr ]
hmm... so you want your server sitting on top of SSH, I don't think that would work. However, you can remote execute thru SSH. ssh -l user@remote <command>. Hope that helps.
Joined: Sep 09, 2003
Check out this article for some detailed discussion on how to setup RMI over SSH. I should mention that the motivation for the article came from the discussion in this thread (And I acknowledge it in the article ). One thing I discovered after sending out the article is that there exists an elegant way to specify the hostname string that gets associated with remote stubs for locally created remote objects. This is done by setting the Java system property to the desired value (which should be "localhost" for SSH tunneling), as explained in the official RMI documentation. This capabilitiy actually makes SSH tunneling for RMI much more elegant and easy to setup.
Joined: Aug 19, 2003
Thank you so very much for replying so throughly a manner. Keep up the great work!!