Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting through SSH tunnels fails for Mac #16

Open
mmuszkow opened this issue Apr 8, 2024 · 0 comments
Open

Connecting through SSH tunnels fails for Mac #16

mmuszkow opened this issue Apr 8, 2024 · 0 comments

Comments

@mmuszkow
Copy link

mmuszkow commented Apr 8, 2024

Connecting to macOS (via asyncssh) with SSH tunnel fails every time, connecting without tunnel works fine. The behaviour is consistent on macOS 12, 13, 14.

async with asyncssh.connect(client.hostname, username=client.username, password=client.password, known_hosts=None) as ssh_conn:
    result = await ssh_conn.run('uname -a', check=True)
    print(client.username, client.hostname, result.stdout, end='')
    async with asyncvnc.connect(client.hostname, port=client.port, username=client.username, password=client.password, opener=ssh_conn.open_connection) as vnc_client:

The VNC server drops connection (<class 'asyncio.exceptions.IncompleteReadError'> 0 bytes read on a total of 4 expected bytes):

  1. After client sends \x00\x00\x00\x0a\x01\x00RSA1\x00\x00\x00\x00 if no host key specified.
  2. After client sends \x00\x00\x01\x8a\x01\x00RSA1 + credentials if host key specified.

I tried to put localhost instead of hostname in asyncssh.connect - result is the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant