spyder-ide/spyder

Remote connections issues - Authentication method: Key file

Opened this issue · 3 comments

Description

What steps will reproduce the problem?

Tools > Manage remote connections... > New connection > Authentication method: Key file

When trying to establish a remote connection using a Key file and the corresponding Passphrase I get this error. Other than the "Issue reporter" pop-up in the "Connection status" tab "Status: Connecting...", in the "Connection messages" instead of an error there is only "Info: Opening SSH connection — TIMESTAMP" it doesnt appear to change even after some time.

I have tried to change Key file and Passphrase without success.

Traceback

exception calling callback for <Future at 0x1c1b048ffd0 state=finished raised TypeError>
Traceback (most recent call last):
  File "C:\Users\manue\AppData\Local\spyder-6\envs\spyder-runtime\Lib\concurrent\futures\_base.py", line 340, in _invoke_callbacks
    callback(self)
  File "C:\Users\manue\AppData\Local\spyder-6\envs\spyder-runtime\Lib\site-packages\spyder\api\asyncdispatcher.py", line 128, in _callback_task_done
    raise exception
  File "C:\Users\manue\AppData\Local\spyder-6\envs\spyder-runtime\Lib\site-packages\spyder\plugins\remoteclient\plugin.py", line 195, in start_remote_server
    await client.connect_and_ensure_server()
  File "C:\Users\manue\AppData\Local\spyder-6\envs\spyder-runtime\Lib\site-packages\spyder\plugins\remoteclient\api\client.py", line 288, in connect_and_ensure_server
    if await self.create_new_connection() and not self.server_started:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\manue\AppData\Local\spyder-6\envs\spyder-runtime\Lib\site-packages\spyder\plugins\remoteclient\api\client.py", line 525, in create_new_connection
    if await self.__create_new_connection():
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\manue\AppData\Local\spyder-6\envs\spyder-runtime\Lib\site-packages\spyder\plugins\remoteclient\api\client.py", line 566, in __create_new_connection
    self._ssh_connection = await asyncssh.connect(
                           ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\manue\AppData\Local\spyder-6\envs\spyder-runtime\Lib\site-packages\asyncssh\connection.py", line 8861, in connect
    new_options = await SSHClientConnectionOptions.construct(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\manue\AppData\Local\spyder-6\envs\spyder-runtime\Lib\site-packages\asyncssh\connection.py", line 7132, in construct
    return cast(_Options, await loop.run_in_executor(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\manue\AppData\Local\spyder-6\envs\spyder-runtime\Lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\manue\AppData\Local\spyder-6\envs\spyder-runtime\Lib\site-packages\asyncssh\connection.py", line 7123, in __init__
    super().__init__(options=options, last_config=last_config, **kwargs)
  File "C:\Users\manue\AppData\Local\spyder-6\envs\spyder-runtime\Lib\site-packages\asyncssh\misc.py", line 454, in __init__
    self.prepare(**self.kwargs)
TypeError: SSHClientConnectionOptions.prepare() got an unexpected keyword argument 'passpharse'

Versions

  • Spyder version: 6.0.3 (standalone)
  • Python version: 3.11.10 64-bit
  • Qt version: 5.15.8
  • PyQt5 version: 5.15.9
  • Operating System: Windows-10-10.0.19045-SP0

Dependencies

# Mandatory:
aiohttp >=3.9.3                  :  3.11.10 (OK)
asyncssh >=2.14.0,<3.0.0         :  2.18.0 (OK)
atomicwrites >=1.2.0             :  1.4.1 (OK)
chardet >=2.0.0                  :  5.2.0 (OK)
cloudpickle >=0.5.0              :  3.1.0 (OK)
cookiecutter >=1.6.0             :  2.6.0 (OK)
diff_match_patch >=20181111      :  20241021 (OK)
github >=2.3.0                   :  2.5.0 (OK)
importlib_metadata >=4.6.0       :  8.5.0 (OK)
intervaltree >=3.0.2             :  3.1.0 (OK)
IPython >=8.13.0,<9.0.0,!=8.17.1 :  8.30.0 (OK)
jedi >=0.17.2,<0.20.0            :  0.19.2 (OK)
jellyfish >=0.7                  :  1.1.2 (OK)
jsonschema >=3.2.0               :  4.23.0 (OK)
keyring >=17.0.0                 :  25.5.0 (OK)
nbconvert >=4.0                  :  7.16.4 (OK)
numpydoc >=0.6.0                 :  1.8.0 (OK)
parso >=0.7.0,<0.9.0             :  0.8.4 (OK)
pexpect >=4.4.0                  :  4.9.0 (OK)
pickleshare >=0.4                :  0.7.5 (OK)
psutil >=5.3                     :  6.1.0 (OK)
pygments >=2.0                   :  2.18.0 (OK)
pylint >=3.1,<4                  :  3.3.2 (OK)
pylint_venv >=3.0.2              :  3.0.4 (OK)
pyls_spyder >=0.4.0              :  0.4.0 (OK)
pylsp >=1.12.0,<1.13.0           :  1.12.0 (OK)
pylsp_black >=2.0.0,<3.0.0       :  2.0.0 (OK)
pyuca >=1.2                      :  1.2 (OK)
qdarkstyle >=3.2.0,<3.3.0        :  3.2.3 (OK)
qstylizer >=0.2.2                :  0.2.4 (OK)
qtawesome >=1.3.1,<1.4.0         :  1.3.1 (OK)
qtconsole >=5.6.1,<5.7.0         :  5.6.1 (OK)
qtpy >=2.4.0                     :  2.4.2 (OK)
rtree >=0.9.7                    :  1.3.0 (OK)
setuptools >=49.6.0              :  75.6.0 (OK)
sphinx >=0.6.6                   :  8.1.3 (OK)
spyder_kernels >=3.0.2,<3.1.0    :  3.0.2 (OK)
superqt >=0.6.2,<1.0.0           :  0.6.7 (OK)
textdistance >=4.2.0             :  4.6.2 (OK)
three_merge >=0.1.1              :  0.1.1 (OK)
watchdog >=0.10.3                :  6.0.0 (OK)
yarl >=1.9.4                     :  1.18.3 (OK)
zmq >=24.0.0                     :  26.2.0 (OK)

# Optional:
cython >=0.21                    :  3.0.11 (OK)
matplotlib >=3.0.0               :  3.9.3 (OK)
numpy >=1.7                      :  2.2.0 (OK)
pandas >=1.1.1                   :  2.2.3 (OK)
scipy >=0.17.0                   :  1.14.1 (OK)
sympy >=0.7.3                    :  1.13.3 (OK)

When trying a Key file without Passphrase it connects, but for some reason it fails to "get server info".

Connection messages:
Info: Opening SSH connection — 16:08:24 30/12/2024
Info: SSH connection opened for None — 16:08:25 30/12/2024
Warning: Error checking server version: bash: /root/.local/bin/micromamba: No such file or directory — 16:08:25 30/12/2024
Info: Installing spyder-remote-server on <IP> — 16:08:25 30/12/2024
Info: Successfully installed spyder-remote-server on <IP> — 16:09:16 30/12/2024
Info: Error parsing server info, received: No info found. — 16:09:17 30/12/2024
Info: Starting remote server for <IP> — 16:09:17 30/12/2024
Info: Error parsing server info, received: No info found. — 16:09:18 30/12/2024
Info: Error parsing server info, received: No info found. — 16:09:20 30/12/2024
Info: Error parsing server info, received: No info found. — 16:09:22 30/12/2024
Info: Error parsing server info, received: No info found. — 16:09:23 30/12/2024
Info: Error parsing server info, received: No info found. — 16:09:25 30/12/2024
Info: Error parsing server info, received: No info found. — 16:09:27 30/12/2024
Error: Faield to get server info — 16:09:27 30/12/2024

(I copied the message as is, replacing only the IP of the server with "<IP>")

When trying again I get the following error:

Connection messages:
Info: Opening SSH connection — 16:29:06 30/12/2024
Info: SSH connection opened for None — 16:29:06 30/12/2024
Info: Supported Server version: 0.1.3 — 16:29:07 30/12/2024
Info: Error parsing server info, received: No info found. — 16:29:08 30/12/2024
Info: Starting remote server for <IP> — 16:29:08 30/12/2024
Info: Error parsing server info, received: No info found. — 16:29:09 30/12/2024
Info: Error parsing server info, received: No info found. — 16:29:11 30/12/2024
Info: Error parsing server info, received: No info found. — 16:29:12 30/12/2024
Info: Error parsing server info, received: No info found. — 16:29:14 30/12/2024
Info: Error parsing server info, received: No info found. — 16:29:16 30/12/2024
Info: Error parsing server info, received: No info found. — 16:29:18 30/12/2024
Error: Faield to get server info — 16:29:18 30/12/2024

Hi @miv2004 thank you for the feedback! Will try to give this a check in a future release! Pinging @ccordoba12 just in case