coreos / fedora-coreos-docs

Documentation for Fedora CoreOS
https://docs.fedoraproject.org/en-US/fedora-coreos/
Other
50 stars 121 forks source link

Document how to change SSH port (and other settings) #649

Open jbtrystram opened 2 months ago

jbtrystram commented 2 months ago

I tried to do this :

variant: fcos
version: 1.5.0
systemd:
  units:
    - name: sshd.socket
      dropins:
        - name: custom-port.conf
          contents: |
              [Socket]
              ListenStream=2222

But this has no effect.

jlebon commented 2 months ago

You probably also need to set Port in an /etc/ssh/sshd_config.d/ dropin.

travier commented 2 months ago

You likely need to setup the SELinux config for the new port to let sshd listen on it.