View Single Post
Posts: 486 | Thanked: 251 times | Joined on Oct 2009
#6
Originally Posted by zwer View Post
You can create a file `sshd_not_to_be_run` at /etc/ssh and the deamon won't start automatically. Then whenever you want to run the service just rename / remove the file and call /etc/init.d/ssh start.

You can also add additional `force-start` option in the /etc/init.d/ssh by duplicating the `start` method and removing its first line (check_for_no_start) so you won't need to remove the file each time you want to start the service.

edit: here you go: http://www.topflashers.com/maemo/misc/ssh . Overwrite the one in /etc/init.d with this one, and add /etc/ssh/sshd_not_to_be_run file and it will never start automatically. When you want to start it use `/etc/init.d/ssh force-start`.
Nothing on the n900 needs to be altered to stop and start sshd. maemo 5 uses upstart to control services. Configuration files are in /etc/event.d instead of /etc/init.d

To stop the sshd server daemon, as root, type:r
Code:
initctl stop sshd
To restart a stopped sshd, root, type:
Code:
initctl start sshd
 

The Following 2 Users Say Thank You to j.s For This Useful Post: