View Single Post
Posts: 200 | Thanked: 300 times | Joined on Nov 2009 @ The Netherlands
#280
Originally Posted by DojwqIO View Post
OK, found out what was going on. When trying to make the ssh connection, smscon first pings the ssh server, and if there is no response, it does not even attempt to establish the connection. My server does not respond to pings and that's why I was able to ssh using the command line, but smscon was not working.

I changed the code in smscon_daemon to try to connect even after a failed ping:

Code:
    if StatusSSH() == False:
        if StatusRemoteHost() == False:
            logging.error('ssh ping failure to "%s". Will try connect anyway' % REMOTEHOST)
            StartSSH()
            return
        else:
            StartSSH()
            return
    else:
        logging.info('ssh connection is already active')
        return
and now smscon can establish the connection.
Hope this helps.
I implement this in release 0.5-1 (see SMSCON wiki in "future release" section, lots of changes in SMSCON!