I am using Windows Subsystem for Linux. When I login to my home server using SSH, I first get the following error

setsockopt IPV6_TCLASS 16: Operation not permitted:

and then everything works as expected:

Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-77-generic x86_64)

From what I can gather, setsockopt is a... thing (it's not a runnable command) used to change socket options, but I have no idea by who or why.

I am mostly interested in what this error is and why it pops up and, since everything still works, less interested in how to fix it (unless it's a big bad scary thing), though that would be nice to know too.

FWIW this is a freshly installed server and I am using keys for SSH. WSL Ubuntu version: 16.04.2 LTS. Windows version: 1703, build number: 15063.296.


1 Answer 1


setsockopt is a Linux syscall - a command sent to the Linux kernel from a userspace application. setsockopt is a very generic one used to set various options on all kind of sockets. In your case it's most likely a descriptor to the udp connection used to resolve the name (DNS) or the tcp connection to your home server (SSH).

IPV6_TCLASS is used to set the IPV6 Traffic class, and the reason it fails is either Windows or WSL do not support that operation or requires special privileges you don't have (The Operation not permitted text comes from the standard library for the ENOPERM error, and although it's about permissions it's not impossible WSL returned it for other reason to maintain app compatibility).

You can safely ignore this error, all it means is that some of the network connections likely did not use the traffic class the application desired, which is unlikely to cause you any issue anyway.

If you'd like to understand more about how WSL works under the hood there is a great video series with accompanying blog articles covering every aspects of WSL (Scroll down the blog posts for the video):

  1. Windows Subsystem for Linux: Architectural Overview
  2. Windows Subsystem for Linux: Process Architecture
  3. Windows Subsystem for Linux: WSL System Calls
  4. Windows Subsystem for Linux: WSL File System Support
  5. Windows and Ubuntu Interoperability
  6. WSL Networking
  • 1
    Good to know we can safely ignore it - how do we make it go away permanently?
    – Startec
    Commented Oct 14, 2020 at 4:51
  • @Startec You can ignore this error by adding -oAddressFamily=inet into ssh call. Vote me up if you find this useful.
    – MaXi32
    Commented Jul 19, 2021 at 15:13
  • You might got a new warning message Warning: Permanently added the ECDSA host key for IP address '' to the list of known hosts. Now add another extra option like this: -o "StrictHostKeyChecking no"
    – MaXi32
    Commented Jul 19, 2021 at 15:16
  • 1
    @MaXi32 that has nothing to do with WSL, this is normally a one-time notice because the host's IP changed, and would should probably not ignore it. This will also tell you when the host keys changed, which could be because the target server was rebuilt/replaced or someone might be hijacking this connection. Commented Jul 23, 2021 at 21:23
  • @ThomasGuyot-Sionnest I did not say anything that this related to WSL. Even I knew his original question is not related to WSL. I just replied to his 1 year old question on the comment which he asked how to ignore the warning messages permanently.
    – MaXi32
    Commented Jul 24, 2021 at 4:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .