Score:0

What does -L mean in ssh on ubuntu?

xk flag

I get this error when I try to connect to my server in Ubuntu to a port other than port 80 (Apache).

[-i identity_file] [-J [user@]host[:port]] [-L address]

I added port 8972 to the list of Apache ports on my server

what is -L in this code and how i can connect to my server with ssh and 8972 apache2 port?

i tried :: and 0.0.0.0 but i got below errors

Bad local forwarding specification '::'

and

Bad local forwarding specification '0.0.0.0'
Hannu avatar
ca flag
`man ssh` hit `/` and type `space`, `+-L` and `Enter`
terdon avatar
cn flag
We can't really help if you don't show the command you are attempting to run. What you show isn't an error message, it is the part of the default usage message of ssh which is printed when you give it a bad option. So, please [edit] your question and i) add the exact ssh command, ii) tell us how you "added port 8972 to the list of Apache ports", iii) how you "tried :: and 0.0.0.0".
Score:1
cn flag

what is -L in this code

It is the bind address or local socket.

How can I connect to my server with ssh and 8972 apache2 port?

The manual states you need to use one of these 4:

-L [bind_address:]port:host:hostport
-L [bind_address:]port:remote_socket
-L local_socket:host:hostport
-L local_socket:remote_socket
        

In words:

Specifies that connections to the given TCP port or Unix socket on the local (client) host are to be forwarded to the given host and port, or Unix socket, on the remote side. This works by al‐ locating a socket to listen to either a TCP port on the local side, optionally bound to the specified bind_address, or to a Unix socket. Whenever a connection is made to the local port or socket, the connection is forwarded over the secure channel, and a connection is made to either host port hostport, or the Unix socket remote_socket, from the remote machine.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.