Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Manhole : ssh_dispatch_run_fatal: Connection to ::1 port 9000: Invalid key length #3291

Closed
Zjemm opened this issue May 26, 2018 · 2 comments
Closed

Comments

@Zjemm
Copy link

Zjemm commented May 26, 2018

Description

unable to connect to manhole after enabling it in homeserver.yml

ssh_dispatch_run_fatal: Connection to ::1 port 9000: Invalid key length

Steps to reproduce

  • enable the manhole part in the config
  • restart synapse
  • try to connect to manhole

this results in: ssh_dispatch_run_fatal: Connection to ::1 port 9000: Invalid key length

Version information

ssh version (1:7.7p1-2).
synapse version : 0.30.0.1
running on debian testing

@nkbai
Copy link

nkbai commented Oct 18, 2018

use ssh-keygen generate a rsa 1024 private key to replace synapse.util.manhole.py
for example:
PUBLIC_KEY ="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDnWgGzx9pRh9cc+qRHUOamvvVmm05nDW5c38AyOjWLIj+bRyGORKZqPzBIibBbP5xo/LsLObkkYy4F1Ou4sRJRgp544TIAhyfH2EP4PMHQfXRTLVH/TPKBxEs3X0Aovp9dExZRSAaqEKCBWHyf8E9jniLNnOF1sK9AD8cXHpn0Qw== [email protected]"

PRIVATE_KEY = """-----BEGIN RSA PRIVATE KEY-----
MIICXgIBAAKBgQDnWgGzx9pRh9cc+qRHUOamvvVmm05nDW5c38AyOjWLIj+bRyGO
RKZqPzBIibBbP5xo/LsLObkkYy4F1Ou4sRJRgp544TIAhyfH2EP4PMHQfXRTLVH/
TPKBxEs3X0Aovp9dExZRSAaqEKCBWHyf8E9jniLNnOF1sK9AD8cXHpn0QwIDAQAB
AoGANbTxXDjy96ZfS7zr0hp30RHXikBXjRjTHABdb8uPjoMe3P9ATPSm5VdR8CT2
qdg0iTLSgSKfVlEn5/ar2i5RH+Xh4i+YHAJ1uTT/SYg4lfFoJeNLRZdw83HFK5o8
v4n4sJcrsdmBUEXuYrilDmToZJSksJT+Wx7JiuyOmLWRFjECQQD/OqjaojC6L39a
A78Ly3BhbMeu1orlA7m3MRnwQSi2szmdAnd1VZv4px4VwD01Mocg0Z/HsqoSxUJn
/IwxbOcPAkEA6AzinGogdTTuj0Vlp8o4OwXF7Ome1Kg6uqzJRuAk1eBRGOuvd5Ki
4yCmakg7HyaHQxv8gKFQus+ckHGkqx4/jQJBAJxNiTDzmNG82sn+d1Y6zWTsoFEj
VEYyBN76c/8deFiC4+qSoyO5PN6HQbZiV1mnyvc/SRGcCema4jMah6SRI+MCQQDm
f94dtwGUy0ZoxGts118xqdNoOMvPu2fTBE1O/Nk6Jf8IfRyn7t2kNUt46VTo5XGY
xNT1xMeXOSDxDiGe5IYFAkEA+OKJEwgK2p9awPU+i5FF2XBm9JBKzesC6oYJNX1K
9jPQ9cNZf3wApY80cWHHqlmkko/DmTA2z+eotOLn/UW0Ww==
-----END RSA PRIVATE KEY-----"""

then it works

nkbai pushed a commit to nkbai/synapse that referenced this issue Oct 18, 2018
@richvdh
Copy link
Member

richvdh commented Oct 18, 2018

I believe this was fixed by #3841.

@richvdh richvdh closed this as completed Oct 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants