Hello Community,
We have Installed a LDAP Directory behind a Firewall with redirectory port on an Ubuntu virtual machine. The virtual machine is installed on an Ubuntu physical server, that hosts many other virtual machine. All the virtual machine are only joinable from the intern network.
My Problem:
I want to connect on the virtual machine on a special port, were LDAP is installed. I do this:
First step: I connect me through ssh on the physical host
(ssh padressephysicalhost).
Second step: I try to open a tunnel on the virtual guest with following parameter:
Source port: 3391
Destination: 389
Ip Guest: 192.168.10.10
Which ssh parameter have I to use?
Thanks
Best regards
If I understand correctly:
ssh -L 3391:192.168.10.10:389 user@padressephysicalhost
Thanks you firstly for your answer.
You correctly understand, but I can connect through ssh on the Physical host (the root Server). Now, that I am on it, I want to open a tunnel on the Guest on the port 389.
I tried
ssh -L 3391:192.168.10.10:389
and here ist he result:
usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
[-D [bind_address:]port] [-e escape_char] [-F configfile]
[-I pkcs11] [-i identity_file]
[-L [bind_address:]port:host:hostport]
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
[-R [bind_address:]port:host:hostport] [-S ctl_path]
[-W host:port] [-w local_tun[:remote_tun]]
[user@]hostname [command]
Although the command and the parameters are right, I become this.
I don�t know what i have to do.
Thanks
Best regards
You must give these parameters when starting ssh. Thus, you need to still specify a host to connect to.
If you want to do so after the connection, you need to press [enter]~C to enter a mini command mode and type the same: -L 3391:192.168.10.10:389
I tried this too and I connect only on the root server.
And what's is the mini command mode, I don't know it.
To keep the forums high quality for all users, please take the time to format your posts correctly.
First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags
```text
and
```
by hand.)
Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.
Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.
Thank You.
The UNIX and Linux Forums
You -> Ubuntu Host -> LDAP server ?
You are connecting to the ubuntu host and giving the ldap server address in the -L command? Like this?
$ ssh -L 3391:ldap-server:389 ubuntu-host
Then on your own machine you can connect to localhost:3391 to access LDAP.

It works!!!
Your first answer was correct. I done this:
ssh -L 3391:ldap-server:389 username@ubuntu-host
Thank You,
Best regards
---------- Post updated at 07:10 AM ---------- Previous update was at 07:01 AM ----------
Can I know why the cursor console stay on the Ubuntu host? It seems as if the command opens the tunnel but don't move the prompt to the 192.168.10.10 console.
It is right ?
ubuntu-host is what ssh was told to connect to, how should it go anywhere else?
Why the prompt don't go to 192.168.10.10?
This would make a sens form me.
Why? What logic suggests that ssh ubuntu-host should ssh to anything but ubuntu-host ? Could your forwarding even work if it went anywhere else?
We don't even know that 192.168.10.10 has an ssh server anyway, and it doesn't need one for this operation.
Ok!
Thank you very much for your help! 