How can I truly shut down ssh server?ssh daemon error: sshd must be ownMigrate socat init script to systemdWhy is my Systemd unit loaded, but inactive (dead)?systemd: How to unmask a service whose unit file is empty?Linux ssh (bug/broken) still working even when the service is stopped on linux ubuntu?Why x0vncserver is not starting at boot?What is the difference between Process: and Main PID: in the output of systemctl status?Why is systemd stopping service immediately after it is started?Daemon not started by systemdCan't find SSHD/systemd socket-activated logs

What causes a rotating object to rotate forever without external force—inertia, or something else?

How would you say "Sorry, that was a mistake on my part"?

Round command argument before using

What is this green alien supposed to be on the American covers of the "Hitchhiker's Guide to the Galaxy"?

Why are flying carpets banned while flying brooms are not?

Zhora asks Deckard: "Are you for real?" Was this meant to be significant?

How fast does a character need to move to be effectively invisible?

Why is the Intel 8086 CPU called a 16-bit CPU?

Arithmetics in LuaLaTeX

How can electric field be defined as force per charge, if the charge makes its own, singular electric field?

Why are there few or no black super GMs?

Is encryption still applied if you ignore the SSL certificate warning for self signed?

Why do the digits of a number squared follow a similar quotient?

Term “console” in game consoles

Could a US citizen born through "birth tourism" become President?

How do you give a date interval with diffuse dates?

How to belay quickly ascending top-rope climbers?

What makes MOVEQ quicker than a normal MOVE in 68000 assembly?

How to interpret a promising preprint that was never published?

The most secure way to handle someone forgetting to verify their account?

How do you send money when you're not sure it's not a scam?

Locked-up DOS computer beeped on keypress. What mechanism caused that?

Is it possible to have a career in SciComp without contributing to arms research?

We get more abuse than anyone else



How can I truly shut down ssh server?


ssh daemon error: sshd must be ownMigrate socat init script to systemdWhy is my Systemd unit loaded, but inactive (dead)?systemd: How to unmask a service whose unit file is empty?Linux ssh (bug/broken) still working even when the service is stopped on linux ubuntu?Why x0vncserver is not starting at boot?What is the difference between Process: and Main PID: in the output of systemctl status?Why is systemd stopping service immediately after it is started?Daemon not started by systemdCan't find SSHD/systemd socket-activated logs






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








15















I disable the ssh server with systemctl disable ssh then reboot. After reboot, I still can log into the remote server through ssh. I use systemctl status ssh to check the server status and it is inactive.



$ systemctl -a | grep ssh
ssh.service loaded inactive dead OpenBSD Secure Shell server
ssh@3-192.168.0.120:22-192.168.0.104:31079.service loaded active running OpenBSD Secure Shell server per-connection daemon (192.168.0.104:31079)
system-ssh.slice loaded active active system-ssh.slice
ssh.socket loaded active listening OpenBSD Secure Shell server socket









share|improve this question
























  • Could you add the output of systemctl status ssh to your question?

    – Fiximan
    Jul 9 at 15:21











  • It is much like:● ssh.service - OpenBSD Secure Shell server Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled) Active: inactive (dead) since Tue 2019-07-09 23:25:16 CST; 1s ago

    – codexplorer
    Jul 9 at 15:26







  • 1





    Additionally you should block port 22 on the firewall, so that even if the SSH server is running somehow, it won't be accessible from remote.

    – dr01
    Jul 10 at 10:51


















15















I disable the ssh server with systemctl disable ssh then reboot. After reboot, I still can log into the remote server through ssh. I use systemctl status ssh to check the server status and it is inactive.



$ systemctl -a | grep ssh
ssh.service loaded inactive dead OpenBSD Secure Shell server
ssh@3-192.168.0.120:22-192.168.0.104:31079.service loaded active running OpenBSD Secure Shell server per-connection daemon (192.168.0.104:31079)
system-ssh.slice loaded active active system-ssh.slice
ssh.socket loaded active listening OpenBSD Secure Shell server socket









share|improve this question
























  • Could you add the output of systemctl status ssh to your question?

    – Fiximan
    Jul 9 at 15:21











  • It is much like:● ssh.service - OpenBSD Secure Shell server Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled) Active: inactive (dead) since Tue 2019-07-09 23:25:16 CST; 1s ago

    – codexplorer
    Jul 9 at 15:26







  • 1





    Additionally you should block port 22 on the firewall, so that even if the SSH server is running somehow, it won't be accessible from remote.

    – dr01
    Jul 10 at 10:51














15












15








15


1






I disable the ssh server with systemctl disable ssh then reboot. After reboot, I still can log into the remote server through ssh. I use systemctl status ssh to check the server status and it is inactive.



$ systemctl -a | grep ssh
ssh.service loaded inactive dead OpenBSD Secure Shell server
ssh@3-192.168.0.120:22-192.168.0.104:31079.service loaded active running OpenBSD Secure Shell server per-connection daemon (192.168.0.104:31079)
system-ssh.slice loaded active active system-ssh.slice
ssh.socket loaded active listening OpenBSD Secure Shell server socket









share|improve this question
















I disable the ssh server with systemctl disable ssh then reboot. After reboot, I still can log into the remote server through ssh. I use systemctl status ssh to check the server status and it is inactive.



$ systemctl -a | grep ssh
ssh.service loaded inactive dead OpenBSD Secure Shell server
ssh@3-192.168.0.120:22-192.168.0.104:31079.service loaded active running OpenBSD Secure Shell server per-connection daemon (192.168.0.104:31079)
system-ssh.slice loaded active active system-ssh.slice
ssh.socket loaded active listening OpenBSD Secure Shell server socket






systemd sshd






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 9 at 15:47









Gilles

564k134 gold badges1161 silver badges1669 bronze badges




564k134 gold badges1161 silver badges1669 bronze badges










asked Jul 9 at 15:11









codexplorercodexplorer

1788 bronze badges




1788 bronze badges












  • Could you add the output of systemctl status ssh to your question?

    – Fiximan
    Jul 9 at 15:21











  • It is much like:● ssh.service - OpenBSD Secure Shell server Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled) Active: inactive (dead) since Tue 2019-07-09 23:25:16 CST; 1s ago

    – codexplorer
    Jul 9 at 15:26







  • 1





    Additionally you should block port 22 on the firewall, so that even if the SSH server is running somehow, it won't be accessible from remote.

    – dr01
    Jul 10 at 10:51


















  • Could you add the output of systemctl status ssh to your question?

    – Fiximan
    Jul 9 at 15:21











  • It is much like:● ssh.service - OpenBSD Secure Shell server Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled) Active: inactive (dead) since Tue 2019-07-09 23:25:16 CST; 1s ago

    – codexplorer
    Jul 9 at 15:26







  • 1





    Additionally you should block port 22 on the firewall, so that even if the SSH server is running somehow, it won't be accessible from remote.

    – dr01
    Jul 10 at 10:51

















Could you add the output of systemctl status ssh to your question?

– Fiximan
Jul 9 at 15:21





Could you add the output of systemctl status ssh to your question?

– Fiximan
Jul 9 at 15:21













It is much like:● ssh.service - OpenBSD Secure Shell server Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled) Active: inactive (dead) since Tue 2019-07-09 23:25:16 CST; 1s ago

– codexplorer
Jul 9 at 15:26






It is much like:● ssh.service - OpenBSD Secure Shell server Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled) Active: inactive (dead) since Tue 2019-07-09 23:25:16 CST; 1s ago

– codexplorer
Jul 9 at 15:26





1




1





Additionally you should block port 22 on the firewall, so that even if the SSH server is running somehow, it won't be accessible from remote.

– dr01
Jul 10 at 10:51






Additionally you should block port 22 on the firewall, so that even if the SSH server is running somehow, it won't be accessible from remote.

– dr01
Jul 10 at 10:51











1 Answer
1






active

oldest

votes


















26














The systemd SSH socket is active, and the SSH service is socket-activated. You need to disable the socket as well:



systemctl disable --now ssh.socket


In fact, on my Arch system, the sshd daemon runs only when a new connection comes in. At other times, the only instances of sshd are the child processes forked off to handle those connections.



Also see:



  • systemd and socket activation





share|improve this answer


















  • 2





    @spender that's Lennart Poettering's official blog, so it's hard to get a 'better' source than that. Not sure why you're getting a warning from Firefox, but I'm not

    – Michael Snook
    Jul 10 at 13:50






  • 1





    Ah, you're probably getting a warning about his self-signed certificate.

    – muru
    Jul 10 at 13:54






  • 1





    @spender: Indeed the error message is utterly awful. It should be telling you not to submit private data to the site, not that "hackers can steal your [implied: at-rest] data if you visit the site". It reads like a scareware/fake-AV message which users should be trained to ignore.

    – R..
    Jul 10 at 14:01







  • 1





    Now that Lets Encrypt is so easy to use, Poettering should use it instead of self-signed certificates. :/

    – muru
    Jul 10 at 14:06






  • 5





    @muru give Poettering a tad bit of time - it takes time to integrate a CA into an init manager....

    – ivanivan
    Jul 10 at 17:41













Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f529203%2fhow-can-i-truly-shut-down-ssh-server%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









26














The systemd SSH socket is active, and the SSH service is socket-activated. You need to disable the socket as well:



systemctl disable --now ssh.socket


In fact, on my Arch system, the sshd daemon runs only when a new connection comes in. At other times, the only instances of sshd are the child processes forked off to handle those connections.



Also see:



  • systemd and socket activation





share|improve this answer


















  • 2





    @spender that's Lennart Poettering's official blog, so it's hard to get a 'better' source than that. Not sure why you're getting a warning from Firefox, but I'm not

    – Michael Snook
    Jul 10 at 13:50






  • 1





    Ah, you're probably getting a warning about his self-signed certificate.

    – muru
    Jul 10 at 13:54






  • 1





    @spender: Indeed the error message is utterly awful. It should be telling you not to submit private data to the site, not that "hackers can steal your [implied: at-rest] data if you visit the site". It reads like a scareware/fake-AV message which users should be trained to ignore.

    – R..
    Jul 10 at 14:01







  • 1





    Now that Lets Encrypt is so easy to use, Poettering should use it instead of self-signed certificates. :/

    – muru
    Jul 10 at 14:06






  • 5





    @muru give Poettering a tad bit of time - it takes time to integrate a CA into an init manager....

    – ivanivan
    Jul 10 at 17:41















26














The systemd SSH socket is active, and the SSH service is socket-activated. You need to disable the socket as well:



systemctl disable --now ssh.socket


In fact, on my Arch system, the sshd daemon runs only when a new connection comes in. At other times, the only instances of sshd are the child processes forked off to handle those connections.



Also see:



  • systemd and socket activation





share|improve this answer


















  • 2





    @spender that's Lennart Poettering's official blog, so it's hard to get a 'better' source than that. Not sure why you're getting a warning from Firefox, but I'm not

    – Michael Snook
    Jul 10 at 13:50






  • 1





    Ah, you're probably getting a warning about his self-signed certificate.

    – muru
    Jul 10 at 13:54






  • 1





    @spender: Indeed the error message is utterly awful. It should be telling you not to submit private data to the site, not that "hackers can steal your [implied: at-rest] data if you visit the site". It reads like a scareware/fake-AV message which users should be trained to ignore.

    – R..
    Jul 10 at 14:01







  • 1





    Now that Lets Encrypt is so easy to use, Poettering should use it instead of self-signed certificates. :/

    – muru
    Jul 10 at 14:06






  • 5





    @muru give Poettering a tad bit of time - it takes time to integrate a CA into an init manager....

    – ivanivan
    Jul 10 at 17:41













26












26








26







The systemd SSH socket is active, and the SSH service is socket-activated. You need to disable the socket as well:



systemctl disable --now ssh.socket


In fact, on my Arch system, the sshd daemon runs only when a new connection comes in. At other times, the only instances of sshd are the child processes forked off to handle those connections.



Also see:



  • systemd and socket activation





share|improve this answer













The systemd SSH socket is active, and the SSH service is socket-activated. You need to disable the socket as well:



systemctl disable --now ssh.socket


In fact, on my Arch system, the sshd daemon runs only when a new connection comes in. At other times, the only instances of sshd are the child processes forked off to handle those connections.



Also see:



  • systemd and socket activation






share|improve this answer












share|improve this answer



share|improve this answer










answered Jul 9 at 15:21









murumuru

42k5 gold badges102 silver badges177 bronze badges




42k5 gold badges102 silver badges177 bronze badges







  • 2





    @spender that's Lennart Poettering's official blog, so it's hard to get a 'better' source than that. Not sure why you're getting a warning from Firefox, but I'm not

    – Michael Snook
    Jul 10 at 13:50






  • 1





    Ah, you're probably getting a warning about his self-signed certificate.

    – muru
    Jul 10 at 13:54






  • 1





    @spender: Indeed the error message is utterly awful. It should be telling you not to submit private data to the site, not that "hackers can steal your [implied: at-rest] data if you visit the site". It reads like a scareware/fake-AV message which users should be trained to ignore.

    – R..
    Jul 10 at 14:01







  • 1





    Now that Lets Encrypt is so easy to use, Poettering should use it instead of self-signed certificates. :/

    – muru
    Jul 10 at 14:06






  • 5





    @muru give Poettering a tad bit of time - it takes time to integrate a CA into an init manager....

    – ivanivan
    Jul 10 at 17:41












  • 2





    @spender that's Lennart Poettering's official blog, so it's hard to get a 'better' source than that. Not sure why you're getting a warning from Firefox, but I'm not

    – Michael Snook
    Jul 10 at 13:50






  • 1





    Ah, you're probably getting a warning about his self-signed certificate.

    – muru
    Jul 10 at 13:54






  • 1





    @spender: Indeed the error message is utterly awful. It should be telling you not to submit private data to the site, not that "hackers can steal your [implied: at-rest] data if you visit the site". It reads like a scareware/fake-AV message which users should be trained to ignore.

    – R..
    Jul 10 at 14:01







  • 1





    Now that Lets Encrypt is so easy to use, Poettering should use it instead of self-signed certificates. :/

    – muru
    Jul 10 at 14:06






  • 5





    @muru give Poettering a tad bit of time - it takes time to integrate a CA into an init manager....

    – ivanivan
    Jul 10 at 17:41







2




2





@spender that's Lennart Poettering's official blog, so it's hard to get a 'better' source than that. Not sure why you're getting a warning from Firefox, but I'm not

– Michael Snook
Jul 10 at 13:50





@spender that's Lennart Poettering's official blog, so it's hard to get a 'better' source than that. Not sure why you're getting a warning from Firefox, but I'm not

– Michael Snook
Jul 10 at 13:50




1




1





Ah, you're probably getting a warning about his self-signed certificate.

– muru
Jul 10 at 13:54





Ah, you're probably getting a warning about his self-signed certificate.

– muru
Jul 10 at 13:54




1




1





@spender: Indeed the error message is utterly awful. It should be telling you not to submit private data to the site, not that "hackers can steal your [implied: at-rest] data if you visit the site". It reads like a scareware/fake-AV message which users should be trained to ignore.

– R..
Jul 10 at 14:01






@spender: Indeed the error message is utterly awful. It should be telling you not to submit private data to the site, not that "hackers can steal your [implied: at-rest] data if you visit the site". It reads like a scareware/fake-AV message which users should be trained to ignore.

– R..
Jul 10 at 14:01





1




1





Now that Lets Encrypt is so easy to use, Poettering should use it instead of self-signed certificates. :/

– muru
Jul 10 at 14:06





Now that Lets Encrypt is so easy to use, Poettering should use it instead of self-signed certificates. :/

– muru
Jul 10 at 14:06




5




5





@muru give Poettering a tad bit of time - it takes time to integrate a CA into an init manager....

– ivanivan
Jul 10 at 17:41





@muru give Poettering a tad bit of time - it takes time to integrate a CA into an init manager....

– ivanivan
Jul 10 at 17:41

















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f529203%2fhow-can-i-truly-shut-down-ssh-server%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form