The system I'm trying to SSH from is Fedora 20 x86_64. The system tunneling to is Windows 7 Ultimate 32-bit and it has Cygwin installed with TigerVNC and OpenSSH.VNC is running on Windows 7 on port 2= Host:2XWinServer is running on Windows 7 in cygwin.This works vncviewer Hostname:2.When I run this command:$ ssh -L 5902:localhost:5902 User@HostName -p portI get this error but get connected through SSH to the Windows system:Tunnel device failed.Could not request tunnel forwardingHere is the debug:$ ssh -vvv -L 5902:localhost:5980 UserName@HostName -p PortOpenSSH_6.4, OpenSSL 1.0.1e-fips 11 Feb 2013debug1: Reading configuration data /home/UserName/.ssh/configdebug1: /home/UserName/.ssh/config line 20: Applying options for *debug1: /home/UserName/.ssh/config line 54: Applying options for *debug1: Reading configuration data /etc/ssh/ssh_configdebug1: /etc/ssh/ssh_config line 20: Applying options for *debug1: /etc/ssh/ssh_config line 54: Applying options for *debug2: ssh_connect: needpriv 0debug1: Connecting to HostName [HostName] port Port.debug2: fd 3 setting O_NONBLOCKdebug1: fd 3 clearing O_NONBLOCKdebug1: Connection established.debug3: timeout: 499999 ms remain after connectdebug1: identity file /home/UserName/.ssh/id_rsa type -1debug1: identity file /home/UserName/.ssh/id_rsa-cert type -1debug1: identity file /home/UserName/.ssh/id_dsa type -1debug1: identity file /home/UserName/.ssh/id_dsa-cert type -1debug1: identity file /home/UserName/.ssh/id_ecdsa type -1debug1: identity file /home/UserName/.ssh/id_ecdsa-cert type -1debug1: Enabling compatibility mode for protocol 2.0debug1: Local version string SSH-2.0-OpenSSH_6.4debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6debug1: match: OpenSSH_6.6 pat OpenSSH*debug2: fd 3 setting O_NONBLOCKdebug3: put_host_port: [HostName]:Portdebug3: load_hostkeys: loading entries for host [HostName]:Port from file /home/UserName/.ssh/known_hostsdebug3: load_hostkeys: found key type ECDSA in file /home/UserName/.ssh/known_hosts:5debug3: load_hostkeys: loaded 1 keysdebug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521debug1: SSH2_MSG_KEXINIT sentdebug1: SSH2_MSG_KEXINIT receiveddebug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1debug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dssdebug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.sedebug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.sedebug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96debug2: kex_parse_kexinit: none,zlib@openssh.com,zlibdebug2: kex_parse_kexinit: none,zlib@openssh.com,zlibdebug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.sedebug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.sedebug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96debug2: kex_parse_kexinit: none,zlib@openssh.comdebug2: kex_parse_kexinit: none,zlib@openssh.comdebug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: mac_setup: found hmac-md5-etm@openssh.comdebug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com nonedebug2: mac_setup: found hmac-md5-etm@openssh.comdebug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com nonedebug1: sending SSH2_MSG_KEX_ECDH_INITdebug1: expecting SSH2_MSG_KEX_ECDH_REPLYdebug1: Server host key: ECDSA b5:05:1a:33:1b:44:21:ae:00:37:0f:2b:24:ae:41:26debug3: put_host_port: [HostName]:Portdebug3: put_host_port: [HostName]:Portdebug3: load_hostkeys: loading entries for host [HostName]:Port from file /home/UserName/.ssh/known_hostsdebug3: load_hostkeys: found key type ECDSA in file /home/UserName/.ssh/known_hosts:5debug3: load_hostkeys: loaded 1 keysdebug3: load_hostkeys: loading entries for host [192.168.1.69]:34500 from file /home/UserName/.ssh/known_hostsdebug3: load_hostkeys: found key type ECDSA in file /home/UserName/.ssh/known_hosts:5debug3: load_hostkeys: loaded 1 keysdebug1: Host '[HostName]:34500' is known and matches the ECDSA host key.debug1: Found key in /home/UserName/.ssh/known_hosts:5debug1: ssh_ecdsa_verify: signature correctdebug2: kex_derive_keysdebug2: set_newkeys: mode 1debug1: SSH2_MSG_NEWKEYS sentdebug1: expecting SSH2_MSG_NEWKEYSdebug2: set_newkeys: mode 0debug1: SSH2_MSG_NEWKEYS receiveddebug1: Roaming not allowed by serverdebug1: SSH2_MSG_SERVICE_REQUEST sentdebug2: service_accept: ssh-userauthdebug1: SSH2_MSG_SERVICE_ACCEPT receiveddebug2: key: /home/UserName/.ssh/id_rsa ((nil)),debug2: key: /home/UserName/.ssh/id_dsa ((nil)),debug2: key: /home/UserName/.ssh/id_ecdsa ((nil)),debug1: Authentications that can continue: publickey,password,keyboard-interactivedebug3: start over, passed a different list publickey,password,keyboard-interactivedebug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,passworddebug3: authmethod_lookup publickeydebug3: remaining preferred: keyboard-interactive,passworddebug3: authmethod_is_enabled publickeydebug1: Next authentication method: publickeydebug1: Trying private key: /home/UserName/.ssh/id_rsadebug3: no such identity: /home/UserName/.ssh/id_rsa: No such file or directorydebug1: Trying private key: /home/UserName/.ssh/id_dsadebug3: no such identity: /home/UserName/.ssh/id_dsa: No such file or directorydebug1: Trying private key: /home/UserName/.ssh/id_ecdsadebug3: no such identity: /home/UserName/.ssh/id_ecdsa: No such file or directorydebug2: we did not send a packet, disable methoddebug3: authmethod_lookup keyboard-interactivedebug3: remaining preferred: passworddebug3: authmethod_is_enabled keyboard-interactivedebug1: Next authentication method: keyboard-interactivedebug2: userauth_kbdintdebug2: we sent a keyboard-interactive packet, wait for replydebug1: Authentications that can continue: publickey,password,keyboard-interactivedebug3: userauth_kbdint: disable: no info_req_seendebug2: we did not send a packet, disable methoddebug3: authmethod_lookup passworddebug3: remaining preferred: debug3: authmethod_is_enabled passworddebug1: Next authentication method: passwordUserName@HostName's password: debug3: packet_send2: adding 48 (len 68 padlen 12 extra_pad 64)debug2: we sent a password packet, wait for replydebug1: Authentication succeeded (password).Authenticated to HostName ([192.168.1.69]:34500).debug1: Local connections to LOCALHOST:5902 forwarded to remote address localhost:5980debug3: channel_setup_fwd_listener: type 2 wildcard 0 addr NULLdebug3: sock_set_v6only: set socket 4 IPV6_V6ONLYdebug1: Local forwarding listening on ::1 port 5902.debug2: fd 4 setting O_NONBLOCKdebug3: fd 4 is O_NONBLOCKdebug1: channel 0: new [port listener]debug1: Local forwarding listening on 127.0.0.1 port 5902.debug2: fd 5 setting O_NONBLOCKdebug3: fd 5 is O_NONBLOCKdebug1: channel 1: new [port listener]debug1: Requesting tun unit 2147483647 in mode 1debug1: sys_tun_open: failed to configure tunnel (mode 1): Operation not permittedTunnel device open failed.Could not request tunnel forwarding.debug1: channel 2: new [client-session]debug3: ssh_session2_open: channel_new: 2debug2: channel 2: send opendebug1: Requesting no-more-sessions@openssh.comdebug1: Entering interactive session.debug2: callback startdebug2: fd 3 setting TCP_NODELAYdebug3: packet_set_tos: set IP_TOS 0x10debug2: client_session2_setup: id 2debug2: channel 2: request pty-req confirm 1debug1: Sending environment.debug3: Ignored env XDG_VTNRdebug3: Ignored env DREAL_TECHNO_NAMEdebug3: Ignored env MANPATHdebug3: Ignored env VH_PATSFXdebug3: Ignored env SSH_AGENT_PIDdebug3: Ignored env KDE_MULTIHEADdebug3: Ignored env TPD_GLOBALdebug3: Ignored env XDG_SESSION_IDdebug3: Ignored env DM_CONTROLdebug3: Ignored env HOSTNAMEdebug3: Ignored env IMSETTINGS_INTEGRATE_DESKTOPdebug3: Ignored env GPG_AGENT_INFOdebug3: Ignored env MBK_IN_PHdebug3: Ignored env TERMdebug3: Ignored env SHELLdebug3: Ignored env XDG_MENU_PREFIXdebug3: Ignored env XSCH_PARAM_NAMEdebug3: Ignored env HISTSIZEdebug3: Ignored env XDM_MANAGEDdebug3: Ignored env GTK2_RC_FILESdebug3: Ignored env KONSOLE_DBUS_SERVICEdebug3: Ignored env KONSOLE_PROFILE_NAMEdebug3: Ignored env VH_MAXERRdebug3: Ignored env GTK_RC_FILESdebug3: Ignored env GS_LIBdebug3: Ignored env WINDOWIDdebug3: Ignored env QTDIRdebug3: Ignored env RDS_OUTdebug3: Ignored env GNOME_KEYRING_CONTROLdebug3: Ignored env QTINCdebug3: Ignored env SHELL_SESSION_IDdebug3: Ignored env XFSM_PARAM_NAMEdebug3: Ignored env ALLIANCE_TOPdebug3: Ignored env GRAAL_TECHNO_NAMEdebug3: Ignored env KDE_FULL_SESSIONdebug3: Ignored env TPD_LOCALdebug3: Ignored env IMSETTINGS_MODULEdebug3: Ignored env QT_GRAPHICSSYSTEM_CHECKEDdebug3: Ignored env USERdebug3: Ignored env LS_COLORSdebug3: Ignored env LD_LIBRARY_PATHdebug3: Ignored env SSH_AUTH_SOCKdebug3: Ignored env SESSION_MANAGERdebug3: Ignored env DESKTOP_SESSIONdebug3: Ignored env PATHdebug3: Ignored env MAILdebug3: Ignored env MBK_SCALE_Xdebug3: Ignored env QT_IM_MODULEdebug3: Ignored env MBK_CATAL_NAMEdebug3: Ignored env PWDdebug1: Sending env XMODIFIERS = @im=nonedebug2: channel 2: request env confirm 0debug3: Ignored env KONSOLE_DBUS_WINDOWdebug3: Ignored env MBK_OUT_PHdebug1: Sending env LANG = en_US.UTF-8debug2: channel 2: request env confirm 0debug3: Ignored env KDE_IS_PRELINKEDdebug3: Ignored env GNOME_KEYRING_PIDdebug3: Ignored env KDE_SESSION_UIDdebug3: Ignored env GENVIEW_TECHNO_NAMEdebug3: Ignored env RDS_INdebug3: Ignored env MBK_SPI_MODELdebug3: Ignored env KDEDIRSdebug3: Ignored env MBK_OUT_LOdebug3: Ignored env KONSOLE_DBUS_SESSIONdebug3: Ignored env MBK_VSSdebug3: Ignored env HISTCONTROLdebug3: Ignored env VH_BEHSFXdebug3: Ignored env SSH_ASKPASSdebug3: Ignored env GPG_TTYdebug3: Ignored env COLORFGBGdebug3: Ignored env SHLVLdebug3: Ignored env XDG_SEATdebug3: Ignored env HOMEdebug3: Ignored env KDE_SESSION_VERSIONdebug1: Sending env LANGUAGE = debug2: channel 2: request env confirm 0debug3: Ignored env MBK_C4_LIBdebug3: Ignored env MBK_VDDdebug3: Ignored env MBK_TARGET_LIBdebug3: Ignored env XCURSOR_THEMEdebug3: Ignored env RDS_TECHNO_NAMEdebug3: Ignored env LOGNAMEdebug3: Ignored env VH_DLYSFXdebug3: Ignored env QTLIBdebug3: Ignored env CVS_RSHdebug3: Ignored env DBUS_SESSION_BUS_ADDRESSdebug3: Ignored env XDG_DATA_DIRSdebug3: Ignored env MBK_IN_LOdebug3: Ignored env LESSOPENdebug3: Ignored env MBK_WORK_LIBdebug3: Ignored env XPAT_PARAM_NAMEdebug3: Ignored env WINDOWPATHdebug3: Ignored env PROFILEHOMEdebug3: Ignored env XDG_RUNTIME_DIRdebug3: Ignored env DISPLAYdebug3: Ignored env QT_PLUGIN_PATHdebug3: Ignored env XDG_CURRENT_DESKTOPdebug3: Ignored env GTK_IM_MODULEdebug3: Ignored env ELP_TECHNO_NAMEdebug3: Ignored env MBK_CATA_LIBdebug3: Ignored env CCACHE_HASHDIRdebug3: Ignored env XAUTHORITYdebug3: Ignored env _debug2: channel 2: request shell confirm 1debug2: callback donedebug2: channel 2: open confirm rwindow 0 rmax 32768debug2: channel_input_status_confirm: type 99 id 2debug2: PTY allocation request accepted on channel 2debug2: channel 2: rcvd adjust 2097152debug2: channel_input_status_confirm: type 99 id 2debug2: shell request accepted on channel 2Last login: Tue Apr 15 07:37:45 2014 from HostName.lan      ____________________,             ______________________________________   .QQQQQQQQQQQQQQQQQQQQQQQQL_         |                                      | .gQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ__   |                                      | gQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ==   |                    _.---.)           | QQQQQQQQQQQQQQQQQQQQQQQQQQQF=         |          (^--^)_.-      `;          | QQQQQQQQQ================!            |          ) ee (           |          | QQQQQQQQ                              |         (_.__._)         /           | QQQQQQQQ                              |           `--',        ,'            | QQQQQQQQ     ~jjj__,                 |            jgs )_|--')_|             | QQQQQQQQ       jjjjjjjjjj___         |                '   '             | QQQQQQQQ        ~jjjjjjjjjjjjjjjjj__  |                                      | QQQQQQQQ        _jjjjjjjjjjjjjj/~~~~  |      The Hippo says: Welcome to      | QQQQQQQQ      .{jjjjjjj/~~~~~         |                             _        | QQQQQQQQ     .{/~~~~`                 |  ____  _   _   ____  _ _ _ (_) ____  | QQQQQQQQ                              | / ___)| | | | / _  || | | || ||  _ \ | QQQQQQQQ                              |( (___ | |_| |( (_| || | | || || | | || QQQQQQQQQL_______________,            | \____) \__  | \___ | \___/ |_||_| |_|| QQQQQQQQQQQQQQQQQQQQQQQQQQQL___       |        (___/  (____|                 | 4QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ___  |                                      | (=QQQQQQQQQQQQQQQQQQQQQQQQQQQQQ====   |       -.-. -.-- --. .-- .. -.        |   (QQQQQQQQQQQQQQQQQQQQQQQQF=         |______________________________________|UserName@HostName ~$ 
SSH tunnel to VNC on a Windows 7 system. Error: Tunnel device open failed
fedora;windows;vnc;ssh tunneling;cygwin
man ssh-L [bind_address:] port:host:hostportSpecifies that the given port on the local (client) host is to be forwarded to  the  given host and  port  on the remote side.  This works by allocating a socket to listen to port on the local side, optionally bound to the specified bind_address.  Whenever a connection  is made to this port, the connection is forwarded over the secure channel, and a connection is made to host port hostport from the remote machine.  Port forwardings can also be specified in  the configuration file. IPv6 addresses can be specified by enclosing the address in square brackets. Only the superuser can forward privileged ports.  By default, the local port is bound in accordance  with the GatewayPorts setting.  However, an explicit bind_address may be used to bind the connection to a specific address. The bind_address of localhost indicates that the listening  port be bound for local use only, while an empty address or * indicates that the port should be avail able from all interfaces.The primary problem here is this: 5902:localhost:5902You can't forward 5902 to 5902 - it already is 5902. That's why it works when you connect without ssh - because it's already served. If you want to forward a local port to another then you do:${FROM_PORT}:localhost:${TO_PORT}If you want to forward a local port to a remote machine you do:${LOCAL_PORT}:${REMOTE_HOST}:${REMOTE_PORT}And the remote machine can then connect with:ssh user@localhost -p ${REMOTE_PORT}