Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Create a config file for ssh command

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?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading