ssh / keyless login problem

From: SA (n0td1scl0s3d_at_ntlworld.com)
Date: 07/25/05

  • Next message: Terry Browning: "Re: ssh / keyless login problem"
    To: secureshell@securityfocus.com
    Date: Mon, 25 Jul 2005 10:15:44 +0100
    
    

    Yesterday 10:19:28

    I should add that the ssh / system on the remote host is:

    ssh -ver
    OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090701f
    uname -a
    Linux diesel.eee.nottingham.ac.uk 2.6.5-1.358 #1 Sat May 8 09:04:50 EDT 2004
    i686 athlon i386 GNU/Linux

    Dear List,

    I am using rsync to backup my local host to a remote host over ssh. I use an
    empty passphrase key pair so that my scripts can run automatically. I am
    using the scripts and setup described here, "http://www.jdmz.net/ssh/".

    I have a strange problem:

    The first time the script runs after a long delay (ie overnight when the local
    host is turned off) ssh always asks for a password despite there being a
    valid key pair on both hosts. If I kill the script and run it again then it
    runs without asking for a password (as it should). My script needs to log in
    several times and run automatically so password free operation is essential.

    I can't see why the first time fails - my only thought is that the remote
    machine mounts my home directory over NFS and maybe this causes a problem?

    Does anyone have any suggestions as to:

    How I might solve this problem?
    How I might diagnose it? (it is hard to repeat it more than once a day)
    How I might stop ssh from asking for a password and return an error instead?
    (in which case I can get my script to handle this exception with a dummy
    login).

    Any other suggestions?

    ssh -ver
    OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
    uname -a
    Linux valium 2.6.11-1.14_FC3 #1 Thu Apr 7 19:25:50 EDT 2005 x86_64 x86_64
    x86_64 GNU/Linux

    Cheers,

    SA

    End of encapsulated message


  • Next message: Terry Browning: "Re: ssh / keyless login problem"

    Relevant Pages

    • Re: How to get ssh to work in a loop
      ... > script for the sun systems which was quite easy as you only need to ... Drop cat (useless use of this command). ... I believe other UNIX systems) is to continually ping if 'ping HOST' is ... Running multiple ssh calls to the same system in a loop ...
      (comp.unix.shell)
    • Re: How to get ssh to work in a loop
      ... The for loop scrambles stdin, which upset, ssh/rsh, I get around ths by ... > script for the sun systems which was quite easy as you only need to ... > mounted filesystem by ssh to HP host and then creating a file called ... > doing loads of ssh to each host. ...
      (comp.unix.shell)
    • Re: How do you save passwords for Git/GitHub?
      ... J> the repositories I need for my project Swift Linux. ... J> for my password EVERY TIME the script tries to download a repository. ... create SSH keyfiles. ... script that logs you into a host using that key, ...
      (Debian-User)
    • Re: ssh read from remote host xx.xx.xx.xx:Connection reset by peer
      ... The script does SSH in a loop and every few ... Connection closed by remote host. ...
      (comp.unix.shell)