MicroOS and Visusal Studio Code

I am try to connect to a new MicroOS server with Visual Studio Code. This works on a year old MicroOS server without issue.

I can ssh to the server without issue.

The error I get is: Failed to set up socket for dynamic port forward to remote port 41181: Socket closed. Is the remote port correct?

I have added the following to: /etc/ssh/sshd_config.d/config.conf
AllowTcpForwarding yes
AllowAgentForwarding yes

and restarted the sshd service.

Still same error.

Additional information. Logs are showing this error:
error: connect to port 45043 failed: Permission denied

@mmontz Hi, perhaps selinux on the newer system…

semanage port -l | grep ssh

Selinux was the problem.

A post from kumarakam on Reddit from two years ago solved the problem. Not sure if it is the correct way though.

semanage is not included in the base MicroOS install.
To install it:

zypper -n in policycoreutils-python-utils

Following semanage commands take care of the SELinux authorization for SSSD and SSHD
semanage permissive -a sssd_t
semanage permissive -a sshd_t

Now it works with SELinux enforcing