original_docstring:  Make an SSH connection with the server to mimic certain functions only for win32 platform to facilitate development.
          
docstring: Make an SSH connection with the server to mimic certain functions only for win32 platform to facilitate development.
docstring_tokens: Make an SSH connection with the server to mimic certain functions only for win32 platform to facilitate development .
code: def ssh_connect_transport(self):
          """ Make an SSH connection with the server to mimic certain functions only for win32 platform to facilitate development.
          """
          if (len(self.hostname) > 0) and (len(self.username) > 0) and (self.port > 0): #  and (len(self.password) > 0)
              # get host key, if we know one
              hostkeytype = None
              hostkey = None
              host_keys = {}
              if (sys.platform != 'win32'):
                  try:
                      host_keys = paramiko.util.load_host_keys(os.path.expanduser('~/.ssh/known_hosts'))
                  except IOError:
                      try:
                          host_keys = paramiko.util.load_host_keys(os.path.expanduser('~/ssh/known_hosts'))
                      except IOError:
                          print '*** Unable to open host keys file'
                  #  print host_keys
                  if host_keys.has_key(hostname):
                      hostkeytype = host_keys[hostname].keys()[0]
                      hostkey = host_keys[hostname][hostkeytype]
                      print 'Using host key of type %s' % hostkeytype
                  else:
                      print "Host key not found. Please create key manually using: ssh %s" % hostname
              # now, connect and use paramiko Transport to negotiate SSH2 across the connection
              try:
                  if (self.isSFTP):
                      t = paramiko.Transport((self.hostname, self.port))
                      t.use_compression(True)
  		    if (self.agent_auth(t)):
  			t.connect(username=self.username, hostkey=hostkey)
  		    else:
  			t.connect(username=self.username, password=self.password, hostkey=hostkey)
                  elif (self.isSSH):
                      t = paramiko.Transport((self.hostname, self.port))
                      t.use_compression(True)
  		    if (self.agent_auth(t)):
  			t.connect(username=self.username, hostkey=hostkey)
  		    else:
  			t.connect(username=self.username, password=self.password, hostkey=hostkey)
              except Exception, e:
                  print '*** Caught exception: %s: %s' % (e.__class__, e)
                  traceback.print_exc()
                  try:
                      t.close()
                  except:
                      pass
                  sys.exit(1)
          else:
              print 'WARNING :: Unable to make a connection with the server using hostname of "%s", port of "%s", username of "%s" and password of "%s".' % (self.hostname,self.port,self.username,self.password)
              return None
          return t
code_tokens: def ssh_connect_transport ( self ) : if ( len ( self . hostname ) > 0 ) and ( len ( self . username ) > 0 ) and ( self . port > 0 ) : hostkeytype = None hostkey = None host_keys = { } if ( sys . platform != 'win32' ) : try : host_keys = paramiko . util . load_host_keys ( os . path . expanduser ( '~/.ssh/known_hosts' ) ) except IOError : try : host_keys = paramiko . util . load_host_keys ( os . path . expanduser ( '~/ssh/known_hosts' ) ) except IOError : print '*** Unable to open host keys file' if host_keys . has_key ( hostname ) : hostkeytype = host_keys [ hostname ] . keys ( ) [ 0 ] hostkey = host_keys [ hostname ] [ hostkeytype ] print 'Using host key of type %s' % hostkeytype else : print "Host key not found. Please create key manually using: ssh %s" % hostname try : if ( self . isSFTP ) : t = paramiko . Transport ( ( self . hostname , self . port ) ) t . use_compression ( True ) if ( self . agent_auth ( t ) ) : t . connect ( username = self . username , hostkey = hostkey ) else : t . connect ( username = self . username , password = self . password , hostkey = hostkey ) elif ( self . isSSH ) : t = paramiko . Transport ( ( self . hostname , self . port ) ) t . use_compression ( True ) if ( self . agent_auth ( t ) ) : t . connect ( username = self . username , hostkey = hostkey ) else : t . connect ( username = self . username , password = self . password , hostkey = hostkey ) except Exception , e : print '*** Caught exception: %s: %s' % ( e . __class__ , e ) traceback . print_exc ( ) try : t . close ( ) except : pass sys . exit ( 1 ) else : print 'WARNING :: Unable to make a connection with the server using hostname of "%s", port of "%s", username of "%s" and password of "%s".' % ( self . hostname , self . port , self . username , self . password ) return None return t
short_docstring: Make an SSH connection with the server to mimic certain functions only for win32 platform to facilitate development.
short_docstring_tokens: Make an SSH connection with the server to mimic certain functions only for win32 platform to facilitate development .
comment: """ Make an SSH connection with the server to mimic certain functions only for win32 platform to facilitate development.
          """$SEP$#  and (len(self.password) > 0)
  $SEP$# get host key, if we know one
  $SEP$#  print host_keys
  $SEP$# now, connect and use paramiko Transport to negotiate SSH2 across the connection
  