Sample Header Ad - 728x90

How do I get the interface name created with `ip tuntap add mode tap`

2 votes
1 answer
905 views
I want to create a tap with sudo, and then attach the user space program (ssh) to it. I don't want to hard code the interface name, as multiple users will be using it, so I want the interface name to be generated dynamically. So I creating the tap like this:
sudo ip tuntap add mode tap user $USER
How do I get the ip command to return the name of the created interface, so that I can use it to pass to ssh?
Asked by Gary van der Merwe (1830 rep)
Jan 9, 2023, 11:06 AM
Last activity: Mar 18, 2023, 07:11 PM