Anyone can give me pointers on how to secure the conection between client and server while using Ovid through ssh? Right now, I don't think my connection runs through a ssh tunnel (I am not using openvista, yet), but I would like my java application to connect to my server through a secured port (so I can work from home and do demos).
Any help is welcome.
-wl
What platform is your java application running on? If it's Windows, you'll probably want to use plink. If it's Linux, you can use the regular OpenSSH client. If you can give more specifics about your setup I can post specific commands. would log into the
You could probably use java SSH libraries to do this as well, but I'm not as familiar with that.
Right, as Jon said, with more specifics we can help you set up a tunnel. Here is how I've done it on linux to a remote machine running RPCBroker:
ssh -N -l <username> -L 9090:127.0.0.1:9260 <remote.host.name>
I have an account on <remote.host.name> as <username>. I already have keys setup so that I don't have to supply a password. Port 9090 is an unused port on the local machine..
With this tunnel running, in my java code, I can simply:
new RPCBrokerConnection("localhost", 9090, "AV1234", "VC1234");
... and the ports will be tunneled.
It's a similar to methods used to tunnel from CPRS to Vista: http://vistapedia.net/index.php?title=Setting_up_an_SSH_Tunnel_between_CPRS_%26_VistA
Thanks,
my java client is running on Windows, so I guess I should run plink.
Also, I am using VistaLink connections, so I assume that I should establish my connection using the same parameters that Andy used for RPCBroker. Is that right?
How about the server side? Do I need to configure ssh at the MUMPS level, or do I do it at the Linux-Ubuntu level?
-wl
Yes, for vistalink you would tunnel to the vistalink port and use a VistaLinkConnection in your java code instead of RPCBrokerConnection. There shouldn't be anything to be done at the mumps level as the encryption happens on the wire and mumps would be unaware of how the command arrived. So, you should only need a system-level configuration.
my java client is running on Windows, so I guess I should run plink.
The article Andy linked to has the pink syntax.
Also, I am using VistaLink connections, so I assume that I should establish my connection using the same parameters that Andy used for RPCBroker. Is that right?
Almost the same, except that you will need to change 9260 to the port that your server is running VistaLink on. When I do SSH tunnels, I try to re-use the same port number on both sides to reduce confusion, unless the local port is already used by something else, or it's a low-numbered port (< 1024) that requires administrative privileges. So if VistaLink on your server was running on port 8001, I would use -L 8001:127.0.0.1:8001. Then no matter where I run the java application from, I just have to change the host in the java application's configuration -- I never have to worry about the port.
How about the server side? Do I need to configure ssh at the MUMPS level, or do I do it at the Linux-Ubuntu level?
On the server side, you just need to sudo apt-get install openssh-server. There is no configuration at the MUMPS level for SSH. To the MUMPS application, it will look like your tunneled connection is actually originating from the server machine itself.
You will need to make sure VistaLink is running -- that is configured at the MUMPS level.