I'm creating a layer 3 SSH tunnel with this command:

ssh  -w any:any root@xx.xx.xx.xx

I want to know the name of the interfaces that it creates. Typically it's tun0, but it varies.

I could force use a specific name, but that could cause a conflict with an existing name. There should be a way to retrieve that name.


Try adding -v to your ssh invocation, then capturing the output and grepping for the tunnel device name. Unfortunately I'm not able to say any more than that, since I can't get that feature to work at all on my server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.