Issue connecting to Ghidra server through SSH tunnel #8517
-
Hi, I'm setting up a Ghidra server for remote collaboration. I have a feeling that maybe I've over-complicated it for myself in an attempt to be secure, but it seems to be so close to working that I thought it was worth sharing to see if I can iron out the last few wrinkles. The setup
ConnectingWhen connecting from the client machine, I first set up an SSH tunnel for the Ghidra ports: Then I start the Ghidra client, and in the server properties dialog I provide "localhost" as the server name and "13100" as the base port. I have tried this from a client machine on the same network as the server, and it connected successfully. Trying the same thing from a remote client however doesn't work. The "connecting" dialog box will appear and remain for some minutes, but eventually I get an error stating that it was unable to connect to localhost:13100. I ran the client with From an untrained eye, it appears that there are multiple attempts being made to connect, with some information being exchanged, before the interaction inexplicably ceases. After a few attempts I eventually see the error message. I had hoped to use the key-authenticated SSH tunnel to avoid exposing the Ghidra ports to the public internet and provide an extra level of security, but maybe this is considered overkill. Still, it feels like I'm almost there, so does anyone have any suggestions about ways I might get this working from clients on remote networks? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Have you tweaked the server.conf at all? Have you tried setting the |
Beta Was this translation helpful? Give feedback.
Sorry, I didn't spot that you'd replied to this. I found what I think is a very similar solution to the problem, so I'm going to outline the root cause and what my solution was in case this is helpful to anyone else. I'd be very interested to know if what you're proposing would have the same effect, and whether either is preferable.
Also please excuse any incorrect nomenclature I use here, I'm not a java expert 😅
The root cause
The cause of the issue was the java.rmi package. If otherwise unspecified, the RMI package attempts to get the IP address of the machine it's running on and supplies that as part of the path to its endpoints. What it will get is the IP address on the local network,…