Bug 3088

Summary: sys_tun_open: failed to open tunnel control interface: No such device
Product: Portable OpenSSH Reporter: tjbryant
Component: sshdAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED WORKSFORME    
Severity: normal CC: djm
Priority: P5    
Version: 8.0p1   
Hardware: All   
OS: Linux   

Description tjbryant 2019-11-05 18:19:24 AEDT
I've tried this on four different servers running versions from 7 to 8.0p1-3. All the servers were running linux. I tried it on x86_64, x86, and MIPS and get the same error each time. This is the command line that I am using:

$ sudo ssh -v -w 1:1 -o Tunnel=ethernet root@192.168.1.1
...
debug1: Requesting tun unit 1 in mode 1
debug1: sys_tun_open: failed to open tunnel control interface: No such device
Tunnel device open failed.
Could not request tunnel forwarding.
...

It logs me in and brings me to the prompt, but tap1 doesn't exist on the remote or local server.
Comment 1 Damien Miller 2020-01-25 16:33:51 AEDT
This problem is caused by the /dev/net/tun device being missing on your server. On Linux this may be caused by the support being compiled out of the kernel and/or the necessary kernel module not being loaded. You might try "modprobe tun" and/or adding "tun" to /etc/modules.

I've committed a change to improve the error message for this case by making it include the device name that it failed to open, but the your problem needs to be solved on your server.
Comment 2 Damien Miller 2021-03-04 09:51:43 AEDT
close bugs that were resolved in OpenSSH 8.5 release cycle