# -*-coding:Utf-8 -*-

"""Contains functions to establish ssh connections"""

# Compatibility 2.7-3.4
from __future__ import absolute_import
from __future__ import unicode_literals

import os

def connect(target, filelog, login, port, sshoptions):
    """ Simply launch the ssh connection """
    os.system("script -q --timing=" + filelog + ".timing " + filelog + \
              ' -c "ssh -p ' + str(port) + " " + login + '@' + target + ' ' + \
               sshoptions + '"')


# -*-coding:Utf-8 -*-

"""Contains functions to establish ssh connections"""

# Compatibility 2.7-3.4
from __future__ import absolute_import
from __future__ import unicode_literals

import os

def connect(target, filelog, login, port, sshoptions):
    """ Simply launch the ssh connection """
    os.system("script -q --timing=" + filelog + ".timing " + filelog + \
              ' -c "ssh -t -p ' + str(port) + " " + login + '@' + target + ' ' + \
               sshoptions + '"')


Add -t option to ssh to allow ssh over ssh (could be add to the options... will see)