View Single Post
oKtosiTe's Avatar
Posts: 47 | Thanked: 14 times | Joined on Jul 2010
#36
Originally Posted by adrianp View Post
It seems sshd is started by upstart so removing the rc2.d link won't work. I know little about upstart but sshd is started from /etc/event.d/sshd so it might be possible to change the exec line to a script :-
Code:
script
        if [ -f /etc/dont_start_ssh ]; then
                exit 1
        else
                exec /usr/sbin/sshd -D
        fi
end script
This is untested but I don't think it will cause any problems with booting the N900 itself, just sshd. Make a backup before trying though; oh and let us know how it goes.
That would work fine, but I'm using "SSH Status and Switcher", an application that lives in the notification area and allows me to switch the SSH server on or off with two simple clicks. With the above fix, said program also fails to start the server.
I think what's needed here is a different condition, say by checking the current runlevel or for a running process, so that starting of the SSH server is only inhibited during the boot process.
I will post back if I learn more.

Edit: I just tried scripting it to check for the current runlevel, but that came back with a permission denied for some reason; it worked fine when executing the same commands manually.

Last edited by oKtosiTe; 2010-08-03 at 17:55.