I'm running into an issue with following a tutorial on How to configure a remote interpreter through WSL for PyCharm. My specific issue comes during the prerequisite part of this tutorial. I get up through step 5, but step 6 says:
Now that you've installed Linux on your Windows system, you have to edit the ssh configuration file /etc/ssh/sshd_config: change the fields PasswordAuthentication to yes, and UsePrivilegeSeparation to no.
However, my sshd_config file doesn't contain "UsePrivilegeSeparation" and I also don't see a couple of the (possibly unrelated) lines they show in the example image, such as "KeyRegenerationInterval" or "ServerKeyBits".
Whether I ignore this step or try to just manually insert the line, I get errors at step 8. When I run, "sudo $(sudo which sshd) -d", I get:
/etc/ssh/sshd_config line 60: Deprecated option UsePrivilegeSeparation
debug1: sshd version OpenSSH_7.6, OpenSSL 1.0.2n 7 Dec 2017
debug1: key_load_private: incorrect passphrase supplied to decrypt private key
Could not load host key: /etc/ssh/ssh_host_rsa_key
debug1: key_load_private: incorrect passphrase supplied to decrypt private key
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
debug1: key_load_private: incorrect passphrase supplied to decrypt private key
Could not load host key: /etc/ssh/ssh_host_ed25519_key
Missing privilege separation directory: /run/sshd
So clearly "UsePrivilegeSeparation" is no longer a valid option, but I'm still missing a privilege separation directory.
If I manually create one, it starts to work, but fails when I actually try to connect from a different window:
debug1: sshd version OpenSSH_7.6, OpenSSL 1.0.2n 7 Dec 2017
debug1: key_load_private: incorrect passphrase supplied to decrypt private key
Could not load host key: /etc/ssh/ssh_host_rsa_key
debug1: key_load_private: incorrect passphrase supplied to decrypt private key
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
debug1: key_load_private: incorrect passphrase supplied to decrypt private key
Could not load host key: /etc/ssh/ssh_host_ed25519_key
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
debug1: Set /proc/self/oom_score_adj from 0 to -1000
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
debug1: Bind to port 22 on ::.
Server listening on :: port 22.
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8
debug1: inetd sockets after dupping: 3, 3
Connection from 127.0.0.1 port 58061 on 127.0.0.1 port 22
debug1: Client protocol version 2.0; client software version OpenSSH_7.6p1 Ubuntu-4
debug1: match: OpenSSH_7.6p1 Ubuntu-4 pat OpenSSH* compat 0x04000000
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4
debug1: permanently_set_uid: 109/65534 [preauth]
debug1: ssh_sandbox_child: prctl(PR_SET_SECCOMP): Invalid argument [preauth]
debug1: list_hostkey_types: [preauth]
No supported key exchange algorithms [preauth]
debug1: do_cleanup [preauth]
debug1: monitor_read_log: child log fd closed
debug1: do_cleanup
debug1: Killing privsep child 136
debug1: audit_event: unhandled event 12
So it is some sort of issue with key exchange, but based on the tutorial that shouldn't be something I have to worry about at all, so I know I must be making some sort of error. What can I do to fix this connection issue?