maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   How to stop SSH? (https://talk.maemo.org/showthread.php?t=92859)

mr666acdc 2014-03-10 22:02

How to stop SSH?
 
Please help: How to stop SSH server on N9?
Code:

/sbin/initctl start ssh
works fine, but
Code:

/sbin/initctl stop ssh
gives:
Code:

initctl: Job has no running instances: ssh

mikecomputing 2014-03-10 22:52

Re: How to stop SSH?
 
maybe name is sshd

mr666acdc 2014-03-10 23:35

Re: How to stop SSH?
 
Tried that too:
Code:

# /sbin/initctl stop sshd
initctl: Unknown job: sshd


coderus 2014-03-11 05:22

Re: How to stop SSH?
 
that impossible. You may have some typo in command. Try just
Code:

stop ssh

peterleinchen 2014-03-11 07:18

Re: How to stop SSH?
 
And do not try to call that command twice in a row.

As it will produce these messages:
Code:

~ # /sbin/initctl stop ssh
ssh stop/waiting
~ # /sbin/initctl stop ssh
initctl: Job has no running instances: ssh
~ # /sbin/initctl start ssh
ssh start/running, process 20499
~ # /sbin/initctl start ssh
initctl: Job is already running: ssh


mr666acdc 2014-03-11 15:16

Re: How to stop SSH?
 
Code:

~ # /sbin/initctl start ssh
ssh start/running, process 6370
~ # stop ssh
sh: stop: not found
~ # /sbin/initctl stop ssh
initctl: Job has no running instances: ssh
~ # killall sshd
~ # killall sshd
killall: sshd: no process killed

But I managed to kill ssh server by
Code:

killall sshd

peterleinchen 2014-03-11 19:07

Re: How to stop SSH?
 
Yes, 'killall sshd' will stop the currently running instance.
But it will be respawned thrice aitomatically:
Quote:

~ # cat /etc/init/ssh.conf
description "SSH"

# started by group-mce.conf
stop on stopped dbus

console output
respawn
respawn limit 3 300
normal exit 0
...
So something else wrong on your device.
Please check
/sbin/initctl status ssh
and
ps | grep ssh
after launching with
/sbin/initctl start ssh

Maybe this reveals abit more, else check logs (e.g. /var/logs/syslog) and/or check configs in /etc/ssh/

--
BTW
What about ssh status check with
ssh root@localhost
?

mr666acdc 2014-03-11 20:35

Re: How to stop SSH?
 
It's not respawning in my case after "killall sshd".

Code:

~ # ps | grep ssh
16967 root grep ssh
~ # /sbin/initctl status ssh
ssh stop/waiting
~ # /sbin/initctl start ssh
ssh start/running, process 16970
~ # ps | grep ssh
16972 root /usr/sbin/sshd
16974 root grep ssh
~ # /sbin/initctl status ssh
ssh stop/waiting

ssh root@localhost asked me to add localhost to known host, i aswered "yes" and then asked me for root password
I'am doing all of that with DeveloperMode disabled.

reinob 2014-03-12 12:01

Re: How to stop SSH?
 
I guess your only problem is that probably the ssh upstart script is broken so that init/upstart actually "forgets" it has started sshd. Can you post the init script?

Does Jolla use upstart at all?

mr666acdc 2014-03-12 20:41

Re: How to stop SSH?
 
1 Attachment(s)
Here is my sript:


All times are GMT. The time now is 14:18.

vBulletin® Version 3.8.8