trying to get a simple file to run at boot. But's not launching. It works if I run it, but, never at launch.
This is my init.d script, launch_ssh_daemon.sh:
#!/bin/bash ### BEGIN INIT INFO # Provides: # Required-Start: # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: # Description ### END INIT INFO /usr/bin/sudo /usr/bin/ssh -i /etc/ssh/id_rsa -N -f -R 10000:localhost:22 email@example.com
I've also run what I think are the necessary commands:
sudo chown root:root launch_ssh_daemon.sh sudo update-rc.d launch_ssh_daemon.sh defaults
And, I've also restarted my computer several times.
I'm not sure what to do. Like I said it works when I launch it, like so:
but I do get prompted for the password, but at boot it should not ask for the password, and it's already set as root.
Any ideas where I'm going wrong?