-   Linux - Software (
-   -   Using sh and nc to attach to a remote process (

xeon123 01-09-2012 11:01 AM

Using sh and nc to attach to a remote process

I want to do debug remotely java code, but, to connect to the remote JVM, I've to pass 3 proxys.

Where's the architecture

MYCOMPUTER --> Proxy1 --> Proxy2 --> JAVAMACHINE --> PROCESS:50030

From MYCOMPUTER; I've to pass Proxy1 and Proxy2 to go to the machine where a java process is running. The java process called PROCESS is running in the JAVAMACHINE node.And I want to attach to the port 50030.

I know that configuring the .ssh/config file is the way to go. I've this configuration, but it's not working in the way that I want:


Host *.ra
      User USER
      ProxyCommand ssh USER@frontend1 "nc -q 10 \$(basename %h .ra) %p"
      StrictHostKeyChecking no
      ServerAliveInterval 120

If I do
ssh USER@frontend2.ra

I stop in the frontend2 machine, but I'm not attaching to the PROCESS:50030

How can I set the .ssh/config file to attach to a remote process?

---------- Post added 01-09-12 at 12:02 PM ----------

This post is to be deleted.

xeon123 01-09-2012 11:05 AM


---------- Post added 01-09-12 at 12:05 PM ----------

I requested to delete this post.

colucix 01-09-2012 01:14 PM

Accidental duplicate. Closed as per request.

All times are GMT -5. The time now is 10:04 AM.