If this is your first visit, be sure to
check out the Forum Rules by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

ssh tunneling via privoxy and tor

I got setup with tor and privoxy today. I'm trying to ssh to my server over the internet via the tor network but I can't figure out how to tell ssh to use privoxy. I've been reading the man page for ssh but I still can't seem to figure it out.

I think it's something along the lines of:

ssh -L 127.0.0.1:5090:serverip:22

5090 is the port privoxy runs on.

Am I even close? I would really appreciate a bump in the right direction!

Thanks,
elight

edit: To clarify, I basically want to to ssh to a remote host through a proxy server running on localhost:5090

allows me to use the email client on a laptop, pointing to localhost:8025 for SMTP services, and localhost:8110 for POP3 services associated with my Comcast account, w/out traversing “foreign” networks with clear text credentials.

If moving between places, I would need to stop and restart the process. This could be as simple as:

however i have a feeling this wont work, as this will try to create a tunnel on port 5900 on your pc.... but privoxy is already on that

i dont know privoxy well but isnt it really for web traffic? if its for content filtering etc then i see now reason to put ssh through it... apples and pears scenario no?

edit
also why use tor with ssh? i know one is encryption one is about being anonymous, but surely any sniffer can tell where the packet is bound for and therefore see who you ssh to? (disclaimer - I do not understand tor....as you can prob tell lol)

(for this to work the web service on the a.b.c.d. machine must be listening on 127.0.0.1, not always the case)

This will create a tunnel from your PC to the machine a.b.c.d. The tunnel starts on your machine on 8080, and will 'fire' the data off to appear on the 'a.b.c.d' machine and go to port 80.

So in this the SSH on your machine is tied (bound) to port 8080

So then you point your web browser to http://127.0.0.1:8080 the web request will then appear on the other server (magically) and be directed to port 80.

Apologies if you already knew this, just putting it in for completeness.

The reason why I think yours will fail is that if you try that command then SSH will try to bind to 5090 as the opening part of the tunnel.... however your other service is already using this, so ssh will say something like 'unable to bind to port'

It also looks like you are trying to direct traffic to port 22 on a.b.c.d, well unless you specify the dest port (using the -p switch) you are already connecting the tunnel to port 22, Im not sure of the implications of having your SSH tunnel go to 22, then point the traffic exiting the tunnel to 22, admittedly your data is now going to port 22 from an internal address and not form an external address, but no idea what that would do.

There is a -D flag in ssh which you can specify which local IPort SSH should bind to, but again, if privoxy is already using this port not sure how to get around it.

I haven't been to sleep yet so I apoliogize if I misunderstood anyone. What I'm trying to achieve is anonymous root access via ssh to a remote server(i.e. over the internet). I want to stress that this is my own personal server I'm trying to access, I'm not trying to go to jail! I have a proxy server running on localhost:5090 which sends all outgoing data through the tor network(the tor network basically sends data through multiply machines, encrypted the whole trip until it reaches its destination). I guess what I want is this:

ssh to send data throught localhost:5090 to remotehost.com

Thank you for all the responses. I'm doing my best to learn from you all!