As @rdtsc said, this is an M12 connector. Uniquely, in my experience, M12 connectors use the term "code" instead of "keying", with different codes informally reserved for specific applications. This is a D-code male receptacle: male, because it has pins; receptacle, because it has threads on the outside (or appears to; if the threads are on the inside of the shell then it is a plug - "plug" and "receptacle" can be somewhat confusing with M12, just find a part with a picture that matches what you want). D-code is generally reserved for ethernet. Many manufacturers will make equivalent versions of this connector, choose whichever you like in accordance with your application and pocketbook.
Image from: https://blog.muellerelectric.com/m12-cable-coding-decoded-which-is-right-for-you-1-0