coreos / fedora-coreos-docs

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

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

Open jbtrystram opened 4 months ago

jbtrystram commented 4 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 4 months ago

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

travier commented 4 months ago

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