LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-11-2011, 12:50 AM   #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, 01: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-12-2011, 12:27 AM   #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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 06:24 PM
How do port-bind shellcodes work with port-forwarding? falc0n Linux - Security 2 04-27-2011 08: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 05:24 AM
Trouble with ssh port forward (bind address) Ratclaws Linux - Security 3 04-24-2007 06:26 PM
forwarding Public IP address in BIND DNS on RedHat Linux EL3 pudhiyavan Linux - Networking 0 05-19-2005 05:16 AM


All times are GMT -5. The time now is 08:38 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration