LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-17-2007, 06:45 PM   #1
tom-ubuntu
LQ Newbie
 
Registered: Feb 2007
Posts: 3

Rep: Reputation: 0
Trouble setting up SSH tunnel


I have a desktop and a laptop, both running Ubuntu Edgy. I have sshd configured on the desktop using a custom port number and authentication key. Using ssh (with and without X) and sshfs, I can connect from the laptop to the desktop without any problems.

When traveling, however, I often have no choice but to use an unsecured wireless access point. For this, I would like to set up an SSH tunnel and SOCKS proxy forwarding. Following the instructions there, I try typing:

Code:
ssh -D 9999 -p 2222 -i ~/.ssh/id_rsa my.homeip.address
When I enter the passphrase, it does give me an ordinary ssh connection, but with the following error:

Code:
bind: Cannot assign requested address
channel_setup_fwd_listener: cannot listen to port: 9999
Could not request local forwarding.
I've tried lots of ports, but always get the same error. I don't believe it's a firewall (firestarter) or router problem. I get a similar error when using the -L option with ssh.

I should probably mention that I've installed apache and squid in the past, but removed squid. Apache is still installed, but not active.

Can anyone point me toward a solution? I'm about ready to give up, but surely there is something simple that I'm overlooking. Thanks for any help any of you can provide.
 
Old 02-17-2007, 07:11 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Squid is a proxy server. Are you using some other proxy server app on the machine you are ssh too?

Check these links.
http://www.linux-noob.com/forums/lof...php/t1151.html
http://www.linuxlogin.com/linux/admin/sshtunnels.php
http://www.suso.org/docs/shell/ssh.sdf

This should help with your other question mentioned.
http://www.linuxquestions.org/questi...d.php?t=530015

Brian

Last edited by Brian1; 02-17-2007 at 07:16 PM.
 
Old 02-17-2007, 09:08 PM   #3
tom-ubuntu
LQ Newbie
 
Registered: Feb 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Brian1
Squid is a proxy server. Are you using some other proxy server app on the machine you are ssh too?
I thought OpenSSH 4.2+ provided its own ad hoc proxy server, when used with the -D option. Would I need to set up Squid or some other proxy server on the host machine in addition to sshd?

I'm wondering if the problem could be in my sshd_config file. AllowTcpForwarding is set to yes, as is GatewayPorts and TCPKeepAlive. What about ListenAddress? Does that require special configuration? I don't understand the bind error that I keep getting.
 
Old 02-24-2007, 08:14 PM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
From what I have been reading I say you are correct in it has a simply proxy setup. I never tried it so I can't say exactly what to do. I just seen this post today and it may help.
http://www.linuxquestions.org/questi...43#post2644643

Brian
 
  


Reply

Tags
networking, proxy, socks, ssh, ubuntu



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
Trying to tunnel X over SSH DaneM Linux - Software 23 06-07-2008 08:17 AM
setting up ssh tunnel for vnc jr0 Linux - Networking 3 10-22-2005 11:38 AM
ssh tunnel TroelsSmit Linux - Software 2 04-30-2004 03:30 PM
Ssh Tunnel tinaa Linux - Software 7 07-29-2003 07:52 PM
SSH tunnel? tarballedtux Linux - Networking 3 04-09-2002 03:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:31 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