0

In this example:

$ ssh -L 8001:192.168.122.4:80

the output give is the default help:

usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
           [-b bind_address] [-c cipher_spec] [-D [bind_address:]port]
           [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]
           [-i identity_file] [-J [user@]host[:port]] [-L address]
           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
           [-Q query_option] [-R address] [-S ctl_path] [-W host:port]
           [-w local_tun[:remote_tun]] destination [command]

What could be the reason(s)?

3

1 Answer 1

3

The command is incomplete. As you can see in the usage page, the only mandatory argument is destination and you have not specified it.

-L 8001:192.168.122.4:80 is a parameter but it is not the destination.

Each ssh connection is independent, you really need to provide, for each one, at the very least, a destination. That's why you get the usage information.

Try something like this:

$ ssh -L 8001:192.168.122.4:80 destination

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .