0

I want to mask ssh so the ssh server is disabled till I need it myself. but still want to have ssh client capabilities.

I use openssh and the service is ssh.service and its alias sshd.service

I use ubuntu 22.04

is the correct steps:

systemctl stop sshd
systemctl disable sshd
systemctl mask sshd
systemctl mask ssh

1 Answer 1

3

Yes, and remember to use sudo:

sudo systemctl stop sshd
sudo systemctl disable sshd
sudo systemctl mask sshd

You don't need the 4th line, since ssh and sshd are aliases.

3
  • did all 4 lines and it worked anyway thanks for the answer
    – Usermaxn
    Commented Jun 7, 2023 at 21:51
  • would the 4th line cause any problems?
    – Usermaxn
    Commented Jun 7, 2023 at 21:51
  • 1
    No, but it does the same as line 3. Commented Jun 8, 2023 at 6:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .