Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

i have a server that uses linux (centos) without root access, i want to know if i can forward a port 10000 to localhost:3306 using ssh or without installing any software?

so that when i access that server on port 10000, it will connect to that computer's localhost port 3306..

normally i would use Pound, but on that server i don't have root access.. how to do this using ssh?

share|improve this question
1  
All you really need is a TCP proxy. Non-root processes should be able to bind to port 10000 if it isn't already in use. –  Zoredache Jan 31 '13 at 6:20

2 Answers 2

(assuming you are talking about OpenSSH):

You connect with SSH from $computer to $server, and give as parameter: "-R10000:localhost:3306". If you want to connect with other computers to $servers, you have to take a look into the sshd configuration file, for the option GatewayPorts, which enables this kind of access.

Read the ssh manpage for more details, you can also decide not to run a command on the other side (so not get a shell) and more (http://www.openssh.org/manual.html)

share|improve this answer

You can run socat which also supports multiple connections. No need for root, you can run it as a normal user.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.