Change SSH port on Ubuntu 22 and newer

On the latest Ubuntu it’s no longer possible to change SSH port in /etc/ssh/sshd_config as SSH deamon is now socket based.

To change the port you need to create a file in /etc/systemd/system/ssh.socket.d/ called listen.conf and specify the new port there.

mkdir -p /etc/systemd/system/ssh.socket.d

Content of listen.conf:

[Socket]
ListenStream=
ListenStream=2245

.. to set the new port to 2245.

sudo systemctl daemon-reload
sudo systemctl restart ssh

Write a Comment

Comment

Webmentions

  • comprar kamagra mexiko

    kamagra dodání přes noc

    comprar kamagra on-line

  • discount itraconazole no prescription mastercard

    buy itraconazole price by pharmacy

    buy cheap itraconazole generic version

  • buy fildena overnight no rx

    cheap fildena uk buy cheap

    cheapest buy fildena generic london

  • how to order flexeril cyclobenzaprine generic switzerland

    buy cheap flexeril cyclobenzaprine generic usa

    order flexeril cyclobenzaprine australia cheap

  • medicament kamagra en ligne

    femme kamagra sans ordonnance canada

    canada kamagra

  • how to buy gabapentin price on prescription

    gabapentin manchester uk

    cheap gabapentin uk order

  • order dutasteride online

    discount dutasteride retail price

    how to buy dutasteride canada with no prescription

  • buy cheap avodart purchase in australia

    buy cheap avodart cheap mastercard

    cheap avodart ireland over the counter

  • how to buy staxyn cheap online pharmacy

    purchase staxyn buy singapore

    cheap staxyn generic prices

  • order xifaxan generic uae

    cheap xifaxan for sale with no prescription required

    purchase xifaxan price london

  • buy cheap rifaximin generic new zealand

    ordering rifaximin canada suppliers

    rifaximin ONLINE FEDEX COD FREE CONSULT

  • buy enclomiphene cost new zealand

    how to order enclomiphene australia pharmacy

    buy cheap enclomiphene buy in the uk

  • cheap androxal using mastercard

    prices for androxal at walmart

    free androxal