View Single Post
Posts: 62 | Thanked: 18 times | Joined on Dec 2009 @ Missouri, USA
#279
Originally Posted by DojwqIO View Post
smscon is not able to establish the reverse tunnel with public key authorization.
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.