On my home PC, I set up sshd as an SFTP server so I could share files with my friends. However, when I attempt to reboot and someone has an SFTP client connected, I get the following message:

$ reboot
User johndoe is logged in on sshd.
Please retry operation after closing inhibitors and logging out other users.
Alternatively, ignore inhibitors and users with 'systemctl reboot -i'.

Although I could do sudo reboot or reboot -i as instructed, this will ignore all inhibitors.

Is it possible to ignore only ssh/sftp logins, or disable ssh from creating the inhibitor in the first place?


What's inhibiting SSH from shutting down is that there is someone actively using it. You can't stop the inhibition while still allowing people to login via SSH.

If you want to override SSH blocking shutdown, but still have the OS check for other possible inhibitions, you can simply shutdown SSH manually first, and then continue with the the reboot:

systemctl stop sshd

Because SSH is still enabled it still start back up at when the machine boots up again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.