I have a ssh command as below:
ssh -o ProxyCommand="ssh ubuntu@ip_addr -W %h:%p" ubuntu@ip_addr2 -L port:ip_addr3:port
I want to create a config file for this command, but I don’t know what is the option of -L, here is my config file so far:
Host cassandra-khatkesh
User ubuntu
Hostname ip_addr2
ProxyCommand ssh ubuntu@ip_addr -W %h:%p
Anyone knows how can I add -L to config file?
>Solution :
-L corresponds to the LocalForward keyword.
Host cassandra-khatkesh
User ubuntu
Hostname ip_addr2
ProxyCommand ssh ubuntu@ip_addr -W %h:%p
LocalForward port ip_addr3:port
Note that the local and remote endpoints are specified separately, not as single :-delimited string.