<div dir="ltr"><div>well, there is the skeleton file which I'm sure you use but I'm not sure.....</div><div><br></div><div> cat /etc/init.d/skeleton</div><div>#! /bin/sh</div><div>### BEGIN INIT INFO</div><div># Provides:          skeleton</div>

<div># Required-Start:    $remote_fs $syslog</div><div># Required-Stop:     $remote_fs $syslog</div><div># Default-Start:     2 3 4 5</div><div># Default-Stop:      0 1 6</div><div># Short-Description: Example initscript</div>

<div># Description:       This file should be used to construct scripts to be</div><div>#                    placed in /etc/init.d.</div><div>### END INIT INFO</div><div><br></div><div># Author: Foo Bar <<a href="mailto:foobar@baz.org">foobar@baz.org</a>></div>

<div>#</div><div># Please remove the "Author" lines above and replace them</div><div># with your own name if you copy and modify this script.</div><div><br></div><div># Do NOT "set -e"</div><div><br></div>

<div># PATH should only include /usr/* if it runs after the mountnfs.sh script</div><div>PATH=/sbin:/usr/sbin:/bin:/usr/bin</div><div>DESC="Description of the service"</div><div>NAME=daemonexecutablename</div><div>

DAEMON=/usr/sbin/$NAME</div><div>DAEMON_ARGS="--options args"</div><div>PIDFILE=/var/run/$NAME.pid</div><div>SCRIPTNAME=/etc/init.d/$NAME</div><div><br></div><div># Exit if the package is not installed</div><div>

[ -x "$DAEMON" ] || exit 0</div><div><br></div><div># Read configuration variable file if it is present</div><div>[ -r /etc/default/$NAME ] && . /etc/default/$NAME</div><div><br></div><div># Load the VERBOSE setting and other rcS variables</div>

<div>. /lib/init/vars.sh</div><div><br></div><div># Define LSB log_* functions.</div><div># Depend on lsb-base (>= 3.2-14) to ensure that this file is present</div><div># and status_of_proc is working.</div><div>. /lib/lsb/init-functions</div>

<div><br></div><div>#</div><div># Function that starts the daemon/service</div><div>#</div><div>do_start()</div><div>{</div><div><span class="" style="white-space:pre">  </span># Return</div><div><span class="" style="white-space:pre">   </span>#   0 if daemon has been started</div>

<div><span class="" style="white-space:pre">    </span>#   1 if daemon was already running</div><div><span class="" style="white-space:pre">        </span>#   2 if daemon could not be started</div><div><span class="" style="white-space:pre">       </span>start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \</div>

<div><span class="" style="white-space:pre">            </span>|| return 1</div><div><span class="" style="white-space:pre">        </span>start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \</div><div><span class="" style="white-space:pre">           </span>$DAEMON_ARGS \</div>

<div><span class="" style="white-space:pre">            </span>|| return 2</div><div><span class="" style="white-space:pre">        </span># Add code here, if necessary, that waits for the process to be ready</div><div><span class="" style="white-space:pre">      </span># to handle requests from services started subsequently which depend</div>

<div><span class="" style="white-space:pre">    </span># on this one.  As a last resort, sleep for some time.</div><div>}</div><div><br></div><div>#</div><div># Function that stops the daemon/service</div><div>#</div><div>do_stop()</div>

<div>{</div><div><span class="" style="white-space:pre">    </span># Return</div><div><span class="" style="white-space:pre">   </span>#   0 if daemon has been stopped</div><div><span class="" style="white-space:pre">   </span>#   1 if daemon was already stopped</div>

<div><span class="" style="white-space:pre">    </span>#   2 if daemon could not be stopped</div><div><span class="" style="white-space:pre">       </span>#   other if a failure occurred</div><div><span class="" style="white-space:pre">    </span>start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME</div>

<div><span class="" style="white-space:pre">    </span>RETVAL="$?"</div><div><span class="" style="white-space:pre">      </span>[ "$RETVAL" = 2 ] && return 2</div><div><span class="" style="white-space:pre">    </span># Wait for children to finish too if this is a daemon that forks</div>

<div><span class="" style="white-space:pre">    </span># and if the daemon is only ever run from this initscript.</div><div><span class="" style="white-space:pre"> </span># If the above conditions are not satisfied then add some other code</div>

<div><span class="" style="white-space:pre">    </span># that waits for the process to drop all resources that could be</div><div><span class="" style="white-space:pre">   </span># needed by services started subsequently.  A last resort is to</div>

<div><span class="" style="white-space:pre">    </span># sleep for some time.</div><div><span class="" style="white-space:pre">     </span>start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON</div><div><span class="" style="white-space:pre">       </span>[ "$?" = 2 ] && return 2</div>

<div><span class="" style="white-space:pre">    </span># Many daemons don't delete their pidfiles when they exit.</div><div><span class="" style="white-space:pre">     </span>rm -f $PIDFILE</div><div><span class="" style="white-space:pre">     </span>return "$RETVAL"</div>

<div>}</div><div><br></div><div>#</div><div># Function that sends a SIGHUP to the daemon/service</div><div>#</div><div>do_reload() {</div><div><span class="" style="white-space:pre">    </span>#</div><div><span class="" style="white-space:pre">  </span># If the daemon can reload its configuration without</div>

<div><span class="" style="white-space:pre">    </span># restarting (for example, when it is sent a SIGHUP),</div><div><span class="" style="white-space:pre">      </span># then implement that here.</div><div><span class="" style="white-space:pre">        </span>#</div>

<div><span class="" style="white-space:pre">    </span>start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME</div><div><span class="" style="white-space:pre">        </span>return 0</div><div>}</div><div><br>
</div>
<div>case "$1" in</div><div>  start)</div><div><span class="" style="white-space:pre">        </span>[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"</div><div><span class="" style="white-space:pre">      </span>do_start</div>

<div><span class="" style="white-space:pre">    </span>case "$?" in</div><div><span class="" style="white-space:pre">             </span>0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;</div><div><span class="" style="white-space:pre">            </span>2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;</div>

<div><span class="" style="white-space:pre">    </span>esac</div><div><span class="" style="white-space:pre">       </span>;;</div><div>  stop)</div><div><span class="" style="white-space:pre">   </span>[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"</div>

<div><span class="" style="white-space:pre">    </span>do_stop</div><div><span class="" style="white-space:pre">    </span>case "$?" in</div><div><span class="" style="white-space:pre">             </span>0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;</div>

<div><span class="" style="white-space:pre">            </span>2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;</div><div><span class="" style="white-space:pre">      </span>esac</div><div><span class="" style="white-space:pre">       </span>;;</div>

<div>  status)</div><div>       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?</div><div>       ;;</div><div>  #reload|force-reload)</div><div><span class="" style="white-space:pre">       </span>#</div>

<div><span class="" style="white-space:pre">    </span># If do_reload() is not implemented then leave this commented out</div><div><span class="" style="white-space:pre">  </span># and leave 'force-reload' as an alias for 'restart'.</div>

<div><span class="" style="white-space:pre">    </span>#</div><div><span class="" style="white-space:pre">  </span>#log_daemon_msg "Reloading $DESC" "$NAME"</div><div><span class="" style="white-space:pre">      </span>#do_reload</div>

<div><span class="" style="white-space:pre">    </span>#log_end_msg $?</div><div><span class="" style="white-space:pre">    </span>#;;</div><div>  restart|force-reload)</div><div><span class="" style="white-space:pre">  </span>#</div>

<div><span class="" style="white-space:pre">    </span># If the "reload" option is implemented then remove the</div><div><span class="" style="white-space:pre">  </span># 'force-reload' alias</div><div><span class="" style="white-space:pre">     </span>#</div>

<div><span class="" style="white-space:pre">    </span>log_daemon_msg "Restarting $DESC" "$NAME"</div><div><span class="" style="white-space:pre">      </span>do_stop</div><div><span class="" style="white-space:pre">    </span>case "$?" in</div>

<div><span class="" style="white-space:pre">    </span>  0|1)</div><div><span class="" style="white-space:pre">             </span>do_start</div><div><span class="" style="white-space:pre">           </span>case "$?" in</div><div><span class="" style="white-space:pre">                     </span>0) log_end_msg 0 ;;</div>

<div><span class="" style="white-space:pre">                    </span>1) log_end_msg 1 ;; # Old process is still running</div><div><span class="" style="white-space:pre">                 </span>*) log_end_msg 1 ;; # Failed to start</div><div><span class="" style="white-space:pre">              </span>esac</div>

<div><span class="" style="white-space:pre">            </span>;;</div><div><span class="" style="white-space:pre"> </span>  *)</div><div><span class="" style="white-space:pre">       </span>  <span class="" style="white-space:pre">        </span># Failed to stop</div>

<div><span class="" style="white-space:pre">            </span>log_end_msg 1</div><div><span class="" style="white-space:pre">              </span>;;</div><div><span class="" style="white-space:pre"> </span>esac</div><div><span class="" style="white-space:pre">       </span>;;</div>

<div>  *)</div><div><span class="" style="white-space:pre"> </span>#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2</div><div><span class="" style="white-space:pre">   </span>echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2</div>

<div><span class="" style="white-space:pre">    </span>exit 3</div><div><span class="" style="white-space:pre">     </span>;;</div><div>esac</div><div><br></div><div>:</div><div>bmike1@PresarioLapTop1:~$ </div><div><br></div></div>

<div class="gmail_extra"><br clear="all"><div>:-)~MIKE~(-:</div>
<br><br><div class="gmail_quote">On Wed, Apr 9, 2014 at 8:51 PM, Michael Havens <span dir="ltr"><<a href="mailto:bmike1@gmail.com" target="_blank">bmike1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">hey.... I figured out the command to issue:<div><br></div><div>  /etc/init.d/ssh start<br></div><div><br></div><div>but am unsure of where to put it to always activate it.</div></div><div class="gmail_extra">


<br clear="all"><div>:-)~MIKE~(-:</div><div><div class="h5">
<br><br><div class="gmail_quote">On Wed, Apr 9, 2014 at 8:42 PM, Michael Havens <span dir="ltr"><<a href="mailto:bmike1@gmail.com" target="_blank">bmike1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div dir="ltr">so, like, I ran 'apt-get install ssh' and apt-get told me it was also going to install:<div><br></div><div>ncurses-term openssh-client openssh-server ssh-import-id<br></div><div><br></div><div>so there is what I was looking for! openssh-server.  Anyways, what file do I need to put in /etc/ssh.d so it will always restart upon a reboot?</div>



</div><div class="gmail_extra"><br clear="all"><div>:-)~MIKE~(-:</div><div><div>
<br><br><div class="gmail_quote">On Wed, Apr 9, 2014 at 8:31 PM, Michael Havens <span dir="ltr"><<a href="mailto:bmike1@gmail.com" target="_blank">bmike1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div dir="ltr">so what directory runs scripts automatically? is it /etc/ssh.d ? I just put a text file with the desired script in there or is there something else I have to do?</div><div class="gmail_extra"><br clear="all">




<div>:-)~MIKE~(-:</div><div><div>
<br><br><div class="gmail_quote">On Wed, Apr 9, 2014 at 3:09 PM, Michael Havens <span dir="ltr"><<a href="mailto:bmike1@gmail.com" target="_blank">bmike1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">did it!<div>apt-get install ssh</div><div>did it</div></div><div class="gmail_extra"><br clear="all"><div>:-)~MIKE~(-:</div><div><div>
<br><br><div class="gmail_quote">On Wed, Apr 9, 2014 at 2:17 PM, Stephen Partington <span dir="ltr"><<a href="mailto:cryptworks@gmail.com" target="_blank">cryptworks@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div dir="ltr"><div class="gmail_default" style="font-family:'trebuchet ms',sans-serif">should be "/etc/init.d/sshd start" or something similar and then depending on dist you simply ad that start script to the system startup chkconfig or something similar. you can also list what is in your init.d and see what is there.</div>







<div class="gmail_default" style="font-family:'trebuchet ms',sans-serif"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 9, 2014 at 1:57 PM, Michael Havens <span dir="ltr"><<a href="mailto:bmike1@gmail.com" target="_blank">bmike1@gmail.com</a>></span> wrote:<br>







<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">how do you turn openssl on? just installing it didn't do it. what happened to openssl-server?</div>






<div class="gmail_extra">
<br clear="all"><div>:-)~MIKE~(-:</div><div><div>
<br><br><div class="gmail_quote">On Wed, Apr 9, 2014 at 1:51 PM, Michael Havens <span dir="ltr"><<a href="mailto:bmike1@gmail.com" target="_blank">bmike1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">









<div dir="ltr">You know.... I seem to remember being able to pull files to the host in another incarnation of the VM. Doesn't that mean sshd isn't installed? So the easy fix is apt-get install sshd..... right?<div>










<br></div><div>ohhh I remember now! I had to install ssh-server.... </div><div>thank you Stephen... openssl . I thought it was openssl-server I hap to install but it nolonger is in the repositories.</div><div><br><div class="gmail_extra">











<br clear="all"><div>:-)~MIKE~(-:</div><div><div><div><div>
<br><br><div class="gmail_quote">On Wed, Apr 9, 2014 at 1:33 PM, Michael Havens <span dir="ltr"><<a href="mailto:bmike1@gmail.com" target="_blank">bmike1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">












<div dir="ltr"><div>I attempted to transfer a file from a virtual machine to the host with less than stellar results:</div><div><br></div><div><div>  root@LFS:/# scp mnt/lfs/sources/binutils-2.24/binutils2.24.run bmike1@192.168.0.4:/home/bmike1/Documents</div>













<div>  ssh: connect to host 192.168.0.4 port 22: Connection refused</div><div>  lost connection</div><div>  root@LFS:/# </div></div><div><br></div><div>I remember this happened before in another situation and there is a solution but can't remember that solution. Could someone help me?</div>













<div>:-)~MIKE~(-:</div>
</div>
</blockquote></div><br></div></div></div></div></div></div></div>
</blockquote></div><br></div></div></div><div><div>
<br>---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br></div></div></blockquote></div><br><br clear="all"><div><div><br></div>
-- <br>A mouse trap, placed on top of your alarm clock, will prevent you from rolling over and going back to sleep after you hit the snooze button.<br>

<br>Stephen<br><br>
</div></div>
<br>---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>