Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

channel 3: open failed: connect failed: Connection refused

Tags:

java

ssh

eclipse

I am trying to debug a remote application. I have initiated a SOCKS proxy on server: ssh -D 9999 hostname

I then try to connect to it from my eclipse debug setting where hostname is the same and port=9999.

However I get error: channel 3: open failed: connect failed: Connection refused

I have also update eclipse network connections to allow SOCKS proxy. The configuration works on a different host name in the same network.

I am not able to interpret this error message. Can someone please assist where I am going wrong? I looked at this: SSH -L connection successful, but localhost port forwarding not working "channel 3: open failed: connect failed: Connection refused" but did find it useful in my case.

I have initiated my process on remote server in debug mode listening a specific port 4111 I confirmed that debug port is open by netstat -a command

Thank-you

like image 761
alwaysAStudent Avatar asked Jan 29 '16 00:01

alwaysAStudent


People also ask

Why is SSH connection refused?

Your local computer doesn't have an SSH client installed To establish an SSH connection, your computer must have a program called SSH client. It allows you to communicate with a remote server and execute SSH commands. If the program is missing, you will see the SSH “Connection refused” error.

How do I turn off SSH tunnel?

To terminate the ssh tunnel, run ps aux | grep ssh , search for the correct tunnel and PID, and then run kill 12345 replacing 12345 with the PID on your machine.

What is tunnel SSH?

SSH tunneling, or SSH port forwarding, is a method of transporting arbitrary data over an encrypted SSH connection. SSH tunnels allow connections made to a local port (that is, to a port on your own desktop) to be forwarded to a remote machine via a secure channel.

What is AllowTcpForwarding in SSH?

AllowTcpForwarding Specifies whether TCP forwarding is permitted. The default is ''yes''. Note that disabling TCP forwarding does not improve security unless users are also denied shell access, as they can always install their own forwarders.


1 Answers

Rather than relying on SOCKS proxying, use

ssh -L4111:localhost:4111 server

To establish a direct connection across the ssh tunnel.

like image 148
Jim Garrison Avatar answered Sep 20 '22 13:09

Jim Garrison