Error connecting to remote servers through SSH

Hello,
Maybe you have an answer to this problem.

desktop : windows 7
remote servers : linux (all flavors)
putty version : 0.63 but i tried 0.61 and even 0.60
komodo edit : tried with 8.0.2 and and 8.5.3

I use komodo for remote editing large conf files and scripts on remote servers.
In my new job, i installed komodo as usual, and it doesn’t work anymore…
When i want to open a remote file, i select a server and then i got an exception.
It fails to make a ssh connection with the remote serveur.
I tried several combination of putty versions and komodo versions…

Here is the komodo 8.0.2 log file :

:smile:[2014-06-27 19:17:51,559] [DEBUG] places_js: waiting for document complete
ERROR:xpcom:Unhandled exception calling ‘int8 * invalidate();’
Traceback (most recent call last):
File “C:\Program Files\ActiveState Komodo Edit 8\lib\mozilla\python\xpcom\server\policy.py”, line 310, in CallMethod
return 0, func(*params)
File “C:\Program Files\ActiveState Komodo Edit 8\lib\mozilla\components\koKPFTreeView.py”, line 489, in invalidate
self._tree.beginUpdateBatch()
AttributeError: ‘NoneType’ object has no attribute ‘beginUpdateBatch’
ERROR:xpcom:Unhandled exception calling ‘int8 * open(in wstring, in int32, in wstring, in wstring, in wstring, in boolean, out retval boolean);’
Traceback (most recent call last):
File “C:\Program Files\ActiveState Komodo Edit 8\lib\mozilla\python\xpcom\server\policy.py”, line 310, in CallMethod
return 0, func(*params)
File “C:\Program Files\ActiveState Komodo Edit 8\lib\mozilla\python\komodo\remotefilelib.py”, line 430, in open
if self.do_authenticateWithAgent():
File “C:\Program Files\ActiveState Komodo Edit 8\lib\mozilla\components\koSFTP.py”, line 165, in do_authenticateWithAgent
if remotefilelib.koRemoteSSH.do_authenticateWithAgent(self) == 1:
File “C:\Program Files\ActiveState Komodo Edit 8\lib\mozilla\python\komodo\remotefilelib.py”, line 761, in do_authenticateWithAgent
agent = paramiko.Agent()
File “C:\Program Files\ActiveState Komodo Edit 8\lib\mozilla\python\komodo\paramiko\agent.py”, line 80, in init
raise SSHException(‘could not get keys from ssh-agent’)
SSHException: could not get keys from ssh-agent
[2014-06-27 19:17:59,137] [ERROR] filepicker.remote:
– EXCEPTION START –
[Exception… “Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [koIRemoteConnectionService.getConnection2]” nsresult: “0x80004005 (NS_ERROR_FAILURE)” location: “JS frame :: chrome://komodo/content/dialogs/filebrowser/filebrowser.js :: connectToServer :: line 1587” data: no]

  • QueryInterface (function) 3 lines
  • message (string) ‘Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [koIRemoteConnectionService.getConnection2]’
  • result (number) 2147500037
  • name (string) ‘NS_ERROR_FAILURE’
  • filename (string) ‘chrome://komodo/content/dialogs/filebrowser/filebrowser.js’
  • lineNumber (number) 1587
  • columnNumber (number) 0
  • location (object) JS frame :: chrome://komodo/content/dialogs/filebrowser/filebrowser.js :: connectToServer :: line 1587
    | + QueryInterface (function) 3 lines
    | + language (number) 2
    | + languageName (string) ‘JavaScript’
    | + filename (string) ‘chrome://komodo/content/dialogs/filebrowser/filebrowser.js’
    | + name (string) ‘connectToServer’
    | + lineNumber (number) 1587
    | + sourceLine (object) null
    | + caller (object) JS frame :: chrome://komodo/content/dialogs/filebrowser/filebrowser.js :: onServerChanged :: line 1620
    | + inner (object) null
    | + data (object) null
    | + initialize (function) 3 lines
    – EXCEPTION END –

Thanks you for you help!

Guillaume

Well, the error comes from the agent.py of the komodo files (library paramiko).
This code in the constructor method of the agent class might be the one from which the exception occurs :smile:

The comment in the class says :smile:class Agent:
“”"
Client interface for using private keys from an SSH agent running on the
local machine. If an SSH agent is running, this class can be used to
connect to it and retreive L{PKey} objects which can be used when
attempting to authenticate to remote SSH servers.

Because the SSH agent protocol uses environment variables and unix-domain
sockets, this probably doesn't work on Windows.  It does work on most
posix platforms though (Linux and MacOS X, for example).
""" 

    ptype, result = self._send_message(chr(SSH2_AGENTC_REQUEST_IDENTITIES))
    if ptype != SSH2_AGENT_IDENTITIES_ANSWER:
        raise SSHException('could not get keys from ssh-agent')
    keys = []
    for i in range(result.get_int()):
        keys.append(AgentKey(self, result.get_string()))
        result.get_string()
    self.keys = tuple(keys)

===> well, ok : paramiko libs used by komodo to open remote file is troubled by my ssh-agent which might be ‘pageant’, part of putty.

However, i might not be the only one using pagent, komodo and python 3 …

Could you try using the IP (rather than a domain name) to connect to your servers to see if this makes a difference?

Read from this and to the end of the topic.

Try to use as domain name IP address of the server, as say’s Nathanr.

Hi,

Actually, i do already use an IP to connect to the remote host.
I’m trying to understand why the auth process tries to use any agent to sftp login.

I have actually removed the PuTTY suite and only installed the PuTTY client. So, i do not have any ssh agent running on my workstation.

I even put a password on the remote server config pannel. So, it shouldn’t need to use an ssh-agent to login.
I have to dig in where the choice to use the agent is done. For exemple, when issuing ssh to a remote server, it goes through testing different auth method till it find one. In my case, it might try the agent/key auth before password and something is wrong with this lib.
I’m looking where to change the order of authentification tests…