LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-10-2011, 11:50 PM   #1
vietbk87
LQ Newbie
 
Registered: Aug 2009
Posts: 5

Rep: Reputation: 0
port forwarding ssh erorr bind: address already in use


Hi all,
- I setup port forwarding of openssh :
connect 1: ssh -g -f -p 11111 -i /<path-to-private-key> user1@ip-server1 -L 22222:ip-server1:161
- Then I setup second connection
connect 2: ssh -g -f -p 11111 -i /<path-to-private-key> user1@ip-server1 -L 22223:ip-server1:3306
- Openssh waring to me "bind: address already in use"
- So I think port 22223 have had another program use,I use command:
ps aux | grep ssh /* find process id of second connection */
kill -9 <process-id-second-connection>
netstat -an | grep 22223 /*find which program use port 22223> */
- but I can't find anywhat
- Then I run again command :
connect 2: ssh -g -f -p 11111 -i /<path-to-private-key> user1@ip-server1 -L 22223:ip-server1:3306
- And I receive a error from OpenSSH :" bind: address already in use"
- anyone can help me
Big Thanks
 
Old 05-11-2011, 12:11 AM   #2
coolsreejith
LQ Newbie
 
Registered: Oct 2010
Distribution: CentOS 5.5
Posts: 23

Rep: Reputation: 2
did you try with any other port?or the error is only from that port.
 
Old 05-11-2011, 11:27 PM   #3
vietbk87
LQ Newbie
 
Registered: Aug 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Hi coolsreejith,
- The First thanks for rely,
- I have tried to change another port or any which port but I still receive a warning from Openssh. My server run many port forwarding, besides connection 2 , I run 2 another connection,
connection 3: ssh -g -f -p 11111 -i /<path-to-private-key> user1@ip-server1 -L 22224:ip-server2:161
connection 4: ssh -g -f -p 11111 -i /<path-to-private-key> user1@ip-server1 -L 22223:ip-server2:3306
- Anywhen I kill process id in the one of the four connections and then I start again that connection , I still receive waring.
- I think, I use different ports to fowarding connections, So Openssh warning "bind: address already in use" to notify that port already to I use without any error,You have any idea?
Big Thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh forwarding : bind to a specific interface flupke Linux - Networking 9 12-09-2011 05:24 PM
How do port-bind shellcodes work with port-forwarding? falc0n Linux - Security 2 04-27-2011 07:10 AM
SSH: error: Bind to port 22 on 0.0.0.0 failed: Address already in use. Swakoo Linux - Security 6 05-08-2007 04:24 AM
Trouble with ssh port forward (bind address) Ratclaws Linux - Security 3 04-24-2007 05:26 PM
forwarding Public IP address in BIND DNS on RedHat Linux EL3 pudhiyavan Linux - Networking 0 05-19-2005 04:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration