Allow JavaSSH package to work correctly.
ok: billm
Note in alert that changes to the webgui and such will not be processed until sshd has finished creating its keys. This may be a long process on 133 megahertz boxes.
File a alert when we start creating keys
file_notice() requires notices.inc
File a notice when we are done creating ssh keys
Reworked sshd script, restarts sshd if we have one and allows running ofssh on alternate port.
Silence read-only error
Exit when ssh is disabled
Do not allow sshd script to run multiple times concurrently.
Use mwexec
Do not hijack stderr
File an alert when SSHD didn't start correctly
Note when sshd startup failure
Create SSH keys with a nice of 20
return_filename_as_string -> file_get_contents
newline before running keygen
Correctly start SSHD
Use enablesshd tag
Enable SSHD on upgrade
Allow SSH service to be disabled / enabled.
Check for key existance before clearing out
Mount config rw before generating keys
Do not mount configuration ro after writing configuration with write_config() if we're booting
Make sure config is mounted rw
Do not perform mount operations
Use correct path. DOH!
Do not check on config.xml items right now.
Do not stat a file if it doesn't exist
Make sure ak key is cleared
If any of the /etc/ssh/ files are corrupted then remove them so they will be forced to regenerate.
Make sure config.xml doesn't hold ssh keys for now
Disable ssh key saving for now.
Operating on argv0 and [1]
exit after stop sync
Sync /root/.authorized_keys on boot
On shutdown call /etc/sshd and alert we're stopping so it can compare /root/.authorized_keys with the config.xml version
Use system("/usr/sbin/sshd"); for platform compatibility
Saving and restoring is fixed. Reenable.
Turn off SSH key saving and restoring until bugs are fixed.
Don't forget to write out ssh keys to config.xml
If keys exist and they are not stored in config.xml, remove the keys and regen and then store them in config.xml
use /etc/rc.d/sshd start
base64 encode the values when saving and restoring
Eliminate whitespace.
No need for duplicate starting ssh messages
Let user SSH in as admin instead of root only (requested for consistency)Full path to sshd
Initial revision