JohnQPublic Posted July 10, 2017 Share Posted July 10, 2017 How do I disable SSH and then enable it later? Link to comment Share on other sites More sharing options...
zador.blood.stained Posted July 10, 2017 Share Posted July 10, 2017 sudo systemctl disable --now sshd sudo systemctl enable --now sshd This will disable/enable and immediately stop/start the sshd daemon. Link to comment Share on other sites More sharing options...
JohnQPublic Posted July 10, 2017 Author Share Posted July 10, 2017 I get systemctl: unrecognized option '--now" I also tried sudo systemctl disable ssh I did something but not disabling ssh (I tried with Putty). Link to comment Share on other sites More sharing options...
zador.blood.stained Posted July 10, 2017 Share Posted July 10, 2017 8 minutes ago, JohnQPublic said: I get systemctl: unrecognized option '--now" --now was added in newer versions, so you need to use 2 separate commands instead sudo systemctl disable sshd sudo systemctl stop sshd sudo systemctl enable sshd sudo systemctl start sshd Link to comment Share on other sites More sharing options...
Recommended Posts