0

I am setting Linux Hopping Station to another different servers.

My current config to connect to another servers is using different port to connect.

e.g

ssh -D 1080 -p 22 [email protected]

ssh -D 1081 -p 22 [email protected]

Now what I would like to have to share the same port from the same box.

ssh -D 1080 -p 22 [email protected]

ssh -D 1080 -p 22 [email protected]

But when I share it, I will get below error:

bind: Address already in use channel_setup_fwd_listener: cannot listen to port: 1080 Could not request local forwarding.

How could I configure the same port? help. thank you.

I want to share the same port because this is needed when configuring firewall in Citrix Firewall on other machine, not needed to many many ports and keep changing when changing connection.

thank you.

1
  • Why do you need more then one connection? The -D port number selected should not make an difference to the any computer other then on ssh client, and by default that will listen on the loopback interface which is usually immune from firewall blocking. Commented Apr 30, 2010 at 19:45

1 Answer 1

1

You can only do that if you have two different IP addresses on that machine. If it's only for local usage, you can use the 127.0.0.1/8 address space like in:

ssh -D 127.0.0.1:1080 -p 22 [email protected] ssh -D 127.0.0.2:1080 -p 22 [email protected] 

Best of luck,
João Miguel Neves

2
  • Hi Joao, still i m getting the same error. is it possible for for you to guide me? thanks Commented May 13, 2010 at 16:54
  • Any chance that port 1080 will be occupied in the client machine? Please post the output of netstat -nat | grep 1080 to check. Commented May 13, 2010 at 17:13

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.