LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Using sh and nc to attach to a remote process (http://www.linuxquestions.org/questions/linux-software-2/using-sh-and-nc-to-attach-to-a-remote-process-922881/)

xeon123 01-09-2012 12:01 PM

Using sh and nc to attach to a remote process
 
Hi,

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:

Code:

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

If I do
[code]
ssh USER@frontend2.ra
[code]

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 12:05 PM

DON'T ANSWER TO THIS POST. ANSWER TO THIS:

http://www.linuxquestions.org/questi...rocess-922882/

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

I requested to delete this post.

colucix 01-09-2012 02:14 PM

Accidental duplicate. Closed as per request.


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