Re: Host key verification failed - SCO

This is a discussion on Re: Host key verification failed - SCO ; Well looks like we went off-topic here. Can we get back to the problem that i am facing. here is the script: #!/bin/sh export PATH=$PATH:/usr/local/bin if [ ! -f /tmp/syncingcms ] then touch /tmp/syncingcms /usr/bin/rsync -av -e /usr/bin/ssh --exclude '*.svn*' ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Re: Host key verification failed

  1. Re: Host key verification failed

    Well looks like we went off-topic here.
    Can we get back to the problem that i am facing.

    here is the script:
    #!/bin/sh

    export PATH=$PATH:/usr/local/bin
    if [ ! -f /tmp/syncingcms ]
    then
    touch /tmp/syncingcms
    /usr/bin/rsync -av -e /usr/bin/ssh --exclude '*.svn*'
    thecoolone@vtu.org:/var/www/vtu/info.vtu.org/* /var/www/testing
    rm /tmp/syncingcms
    fi

    And this is the crontab file
    MAILTO="thecoolone19@hotmail.com"
    SHELL=/bin/bash
    * * * * * /var/cmsfile

    On executing my script for the first time i get this:
    bash -x /var/cmsfile
    + export
    PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/thecoolone/bin:/usr/local/bin
    +
    PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/thecoolone/bin:/usr/local/bin
    + '[' '!' -f /tmp/syncingcms ']'
    + touch /tmp/syncingcms
    + /usr/bin/rsync -av -e /usr/bin/ssh --exclude '*.svn*'
    thecoolone@vtu.org:/var/www/vtu/info.vtu.org/* /var/www/testing
    thecoolone@vtu.org password: "I type in the pwd"
    receiving file list ... done
    rsync: recv_generator: mkdir "/var/www/testing/CVS" failed: Permission
    denied (1 3)
    rsync: stat "/var/www/testing/CVS" failed: No such file or directory
    (2)
    rsync: recv_generator: mkdir "/var/www/testing/maths" failed:
    Permission denied (13)
    rsync: stat "/var/www/testing/maths" failed: No such file or directory
    (2)
    rsync: recv_generator: mkdir "/var/www/testing/maths/images" failed: No
    such fi le or directory (2)

    And this goes on for all the files. And after its done i checked the
    testing directory and nothing is backed up

    And another bizzare thing is when i execute $bash -x /var/cmsfile for
    the 2nd time again i get this msg:
    + export
    PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/thecoolone/bin:/usr/local/bin
    +
    PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/thecoolone/bin:/usr/local/bin
    + '[' '!' -f /tmp/syncingcms ']'

    Only when i remove the /tmp/syncingcms file am i able to execute the
    script again.

    can someone tell me whats happening in here??

    thanks in advance


  2. Re: Host key verification failed

    thecoolone made comment on Thu Nov 30 06:53:57 2006 :
    > Well looks like we went off-topic here.
    > Can we get back to the problem that i am facing.
    >
    > here is the script:
    > #!/bin/sh
    >
    > export PATH=$PATH:/usr/local/bin
    > if [ ! -f /tmp/syncingcms ]
    > then
    > touch /tmp/syncingcms
    > /usr/bin/rsync -av -e /usr/bin/ssh --exclude '*.svn*'
    > thecoolone@vtu.org:/var/www/vtu/info.vtu.org/* /var/www/testing
    > rm /tmp/syncingcms
    > fi
    >
    > And this is the crontab file
    > MAILTO="thecoolone19@hotmail.com"
    > SHELL=/bin/bash
    > * * * * * /var/cmsfile
    >
    > On executing my script for the first time i get this:
    > bash -x /var/cmsfile
    > + export
    > PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/thecoolone/bin:/usr/local/bin
    > +
    > PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/thecoolone/bin:/usr/local/bin
    > + '[' '!' -f /tmp/syncingcms ']'
    > + touch /tmp/syncingcms
    > + /usr/bin/rsync -av -e /usr/bin/ssh --exclude '*.svn*'
    > thecoolone@vtu.org:/var/www/vtu/info.vtu.org/* /var/www/testing
    > thecoolone@vtu.org password: "I type in the pwd"
    > receiving file list ... done
    > rsync: recv_generator: mkdir "/var/www/testing/CVS" failed: Permission
    > denied (1 3)
    > rsync: stat "/var/www/testing/CVS" failed: No such file or directory
    > (2)
    > rsync: recv_generator: mkdir "/var/www/testing/maths" failed:
    > Permission denied (13)
    > rsync: stat "/var/www/testing/maths" failed: No such file or directory
    > (2)
    > rsync: recv_generator: mkdir "/var/www/testing/maths/images" failed: No
    > such fi le or directory (2)
    >
    > And this goes on for all the files. And after its done i checked the
    > testing directory and nothing is backed up


    What version of the OS is this? (uname -X | grep Release ) - while I
    don't doubt your crontab file - I have not see a valid contab file
    with MAILTO and SHELL (any shell variable really) in any SCO OS.
    You can with OSR 6.0.0 have setenv ... to set shell variable but those
    are specified in /etc/default/cron.

    Break your problem into parts:

    Run JUST the rsync from the command line - get it working before wrapping it.

    Do you have the appropriate permission on the receiving machine

    Also you seem to have a weird set of shells in use, the script has #!/bin/sh
    to force to use the bourne shell - the export PATH=$PATH bit is not
    valid for /bin/sh - it is for bash - and then you run it manually via
    BASH - by default all cronjobs are executed under /bin/sh.

    > And another bizzare thing is when i execute $bash -x /var/cmsfile for
    > the 2nd time again i get this msg:
    > + export
    > PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/thecoolone/bin:/usr/local/bin
    > +
    > PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/thecoolone/bin:/usr/local/bin
    > + '[' '!' -f /tmp/syncingcms ']'
    >
    > Only when i remove the /tmp/syncingcms file am i able to execute the
    > script again.
    >
    > can someone tell me whats happening in here??


    Tony has already given you the answer to this one - your script never
    finished so it it never removed the lock file /tmp/syncingcms - as
    the file is present the commands between the [ ! -f /tmp/....]
    and the 'fi' are not run.


    --
    ================================================== ======================
    Tom Melvin tom@tkrh.co.uk http://www.tkrh.demon.co.uk
    Veterinary Solutions Ltd
    ================================================== ======================

  3. Re: Host key verification failed


    thecoolone wrote:
    > Well looks like we went off-topic here.
    > Can we get back to the problem that i am facing.
    >
    > here is the script:
    > #!/bin/sh
    >
    > export PATH=$PATH:/usr/local/bin
    > if [ ! -f /tmp/syncingcms ]
    > then
    > touch /tmp/syncingcms
    > /usr/bin/rsync -av -e /usr/bin/ssh --exclude '*.svn*'
    > thecoolone@vtu.org:/var/www/vtu/info.vtu.org/* /var/www/testing
    > rm /tmp/syncingcms
    > fi
    >
    > And this is the crontab file
    > MAILTO="thecoolone19@hotmail.com"
    > SHELL=/bin/bash
    > * * * * * /var/cmsfile
    >
    > On executing my script for the first time i get this:
    > bash -x /var/cmsfile
    > + export
    > PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/thecoolone/bin:/usr/local/bin
    > +
    > PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/thecoolone/bin:/usr/local/bin
    > + '[' '!' -f /tmp/syncingcms ']'
    > + touch /tmp/syncingcms
    > + /usr/bin/rsync -av -e /usr/bin/ssh --exclude '*.svn*'
    > thecoolone@vtu.org:/var/www/vtu/info.vtu.org/* /var/www/testing
    > thecoolone@vtu.org password: "I type in the pwd"
    > receiving file list ... done
    > rsync: recv_generator: mkdir "/var/www/testing/CVS" failed: Permission
    > denied (1 3)
    > rsync: stat "/var/www/testing/CVS" failed: No such file or directory
    > (2)
    > rsync: recv_generator: mkdir "/var/www/testing/maths" failed:
    > Permission denied (13)
    > rsync: stat "/var/www/testing/maths" failed: No such file or directory
    > (2)
    > rsync: recv_generator: mkdir "/var/www/testing/maths/images" failed: No
    > such fi le or directory (2)



    After checking the directory permission now when i execute bash
    /var/cmsfile
    it execute without any error.

    BUT when i try to execute the same script using cron i still get the
    same error
    "Permission denied, please try again.
    Permission denied, please try again.
    Permission denied (publickey,gssapi-with-mic,password).
    rsync: connection unexpectedly closed (0 bytes received so far)
    [receiver] rsync error: error in rsync protocol data stream (code 12)
    at io.c(359)
    "

    I noticed one thing that was missing in the .ssh directory. the
    known_hosts file was missing. how to get that file?? I followed the
    procedure in http://www.jdmz.net/ssh/ page.

    Many thanks


  4. Re: Host key verification failed


    thecoolone wrote:
    > thecoolone wrote:
    > > Well looks like we went off-topic here.


    That's life in Usenet. It's not "your thread", and it will meander
    wherever it likes..

    > > Can we get back to the problem that i am facing.


    Well, I see now that you are posting to comp.os.linux.misc and
    comp.unix.sco.misc

    Dare we assume that one of the systems involved is a SCO system (of yet
    unnamed vintage and version) and the other is an equally unspecified
    Linux box?


    > > thecoolone@vtu.org password: "I type in the pwd"


    YOU type in the password? How is cron supposed to do that?

    You need a blank passphrase for this to work with cron.

    > I noticed one thing that was missing in the .ssh directory. the
    > known_hosts file was missing. how to get that file?? I followed the
    > procedure in http://www.jdmz.net/ssh/ page.


    Did you? Then why do you still have to type in a password?

    --
    Tony Lawrence
    Unix/Linux/Mac OS X Resources
    http://aplawrence.com


+ Reply to Thread