Reply
Thread Tools
Posts: 30 | Thanked: 23 times | Joined on Nov 2010 @ Poland
#1
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

Last edited by mr666acdc; 2014-03-10 at 23:36.
 
Posts: 3,464 | Thanked: 5,107 times | Joined on Feb 2010 @ Gothenburg in Sweden
#2
maybe name is sshd
__________________
Keep safe and healthy
 

The Following User Says Thank You to mikecomputing For This Useful Post:
Posts: 30 | Thanked: 23 times | Joined on Nov 2010 @ Poland
#3
Tried that too:
Code:
# /sbin/initctl stop sshd
initctl: Unknown job: sshd
 
coderus's Avatar
Posts: 6,436 | Thanked: 12,699 times | Joined on Nov 2011 @ Ängelholm, Sweden
#4
that impossible. You may have some typo in command. Try just
Code:
stop ssh
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following User Says Thank You to coderus For This Useful Post:
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#5
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
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 

The Following User Says Thank You to peterleinchen For This Useful Post:
Posts: 30 | Thanked: 23 times | Joined on Nov 2010 @ Poland
#6
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's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#7
Yes, 'killall sshd' will stop the currently running instance.
But it will be respawned thrice aitomatically:
~ # 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
?
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature

Last edited by peterleinchen; 2014-03-11 at 19:14.
 

The Following User Says Thank You to peterleinchen For This Useful Post:
Posts: 30 | Thanked: 23 times | Joined on Nov 2010 @ Poland
#8
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.
 
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#9
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?
 

The Following User Says Thank You to reinob For This Useful Post:
Posts: 30 | Thanked: 23 times | Joined on Nov 2010 @ Poland
#10
Here is my sript:
Attached Files
File Type: txt ssh.txt (680 Bytes, 69 views)
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 17:26.