Can Kermit check for or set a timeout condition - Protocols

This is a discussion on Can Kermit check for or set a timeout condition - Protocols ; I am using Kermit from Linux and I am doing ssh. I want someway to check if the server I am connecting to is down, instead of hanging my script in an endless loop. Is there a way to check ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Can Kermit check for or set a timeout condition

  1. Can Kermit check for or set a timeout condition

    I am using Kermit from Linux and I am doing ssh.

    I want someway to check if the server I am connecting to is down,
    instead of hanging my script in an endless loop.

    Is there a way to check for this condition or tell Kermit after a
    certain amount of time, if it doesn't connect to quit ?

    Thank you

  2. Re: Can Kermit check for or set a timeout condition

    In article ,
    newexpectuser wrote:
    : I am using Kermit from Linux and I am doing ssh.
    :
    : I want someway to check if the server I am connecting to is down,
    : instead of hanging my script in an endless loop.
    :
    : Is there a way to check for this condition or tell Kermit after a
    : certain amount of time, if it doesn't connect to quit ?
    :
    For making SSH connections, C-Kermit just starts up the external
    ssh client, so in this case it's the ssh client and not Kermit that's
    taking forever.

    You might be able to alleviate this with something like:

    ping
    if failure (stop or exit)
    set host /pty ....

    But that only tells you if the host is up and reachable, not if an SSH
    server is running. In general you can't tell in advance whether a
    particular connection can be made. The only way to tell for sure is to
    try to make it.

    - Frank

+ Reply to Thread