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

Possible to use with VS Code's remote SSH-extension? #70

Open
aurany opened this issue Feb 24, 2022 · 2 comments
Open

Possible to use with VS Code's remote SSH-extension? #70

aurany opened this issue Feb 24, 2022 · 2 comments

Comments

@aurany
Copy link

aurany commented Feb 24, 2022

It would be really nice to use the VS Code extension "Remote SSH" to be able to connect to a users notebook. This requires that the ssh server accept TCP forwardig (like OpenSSH's sshd_config AllowTCPForwarding=yes). Is this possible to achieve with this package? I have tried but VS Code cannot, maybe due to TCP forwarding i'm not sure. Ideas?

@aurany aurany changed the title Possible to use with VS Code remote ssh? Possible to use with VS Code's remote SSH-extension? Feb 24, 2022
@yuhuishi-convect
Copy link

I am looking into how to get the exact thing you describe to work.
I think it might be due to the tunneling support -- #26

@mkuziemko
Copy link

mkuziemko commented Aug 16, 2022

@yuhuishi-convect do you manage to make it work with VS code?

I tried to use it with IntelliJ with the remote ssh plugin but it does not seem to work:

[asyncssh] [conn=8] Sending version SSH-2.0-AsyncSSH_2.7.0
[asyncssh] [conn=8] Received version SSH-2.0-IntelliJ__Gateway_GW-221.5921.22__SSHJ_0.32.0_idea2
[asyncssh] [conn=8] Requesting key exchange
[asyncssh] [conn=8] Received key exchange request
[asyncssh] [conn=8] Beginning key exchange
[asyncssh] [conn=8] Completed key exchange
[asyncssh] [conn=8] Beginning auth for user 
[asyncssh] [conn=8] Trying password auth
[asyncssh] [conn=8] Auth for user succeeded
[asyncssh] [conn=8] Received disconnect:  (11)
[asyncssh] [conn=9] Accepted SSH client connection
[asyncssh] [conn=9]   Local address: 127.0.0.1, port 8022
[asyncssh] [conn=9]   Peer address: 127.0.0.1, port 46554
[asyncssh] [conn=9] Sending version SSH-2.0-AsyncSSH_2.7.0
[asyncssh] [conn=9] Received version SSH-2.0-IntelliJ__Gateway_GW-221.5921.22__SSHJ_0.32.0_idea2
[asyncssh] [conn=9] Requesting key exchange
[asyncssh] [conn=9] Received key exchange request
[asyncssh] [conn=9] Beginning key exchange
[asyncssh] [conn=9] Completed key exchange
[asyncssh] [conn=9] Beginning auth for user 

[asyncssh] [conn=9] Trying password auth
[asyncssh] [conn=9] Auth for user  succeeded
[asyncssh] [conn=9, chan=0] Set write buffer limits: low-water=16384, high-water=65536
[asyncssh] [conn=9, chan=0] New SSH session requested
[asyncssh] [conn=9, chan=0]   Command: echo $SHELL
[asyncssh] [conn=9, chan=0] Received TERM signal
[asyncssh] [conn=9, chan=0] Received channel close
[asyncssh] [conn=9, chan=1] Set write buffer limits: low-water=16384, high-water=65536
[asyncssh] [conn=9, chan=1] New SSH session requested
[asyncssh] [conn=9, chan=0] Channel closed
[asyncssh] [conn=9] Closing connection
[asyncssh] [conn=9, chan=1] Closing channel
[asyncssh] [conn=9] Sending disconnect: Disconnected by application (11)
[asyncssh] [conn=9, chan=1] Closing channel due to connection close
[asyncssh] [conn=9, chan=1] Channel closed
Task exception was never retrieved
future: <Task finished name='Task-317' coro=<NotebookSSHServer._handle_stdin() done, defined at /srv/jupyterhub-ssh/jupyterhub_ssh/__init__.py:133> exception=SignalReceived('Signal: TERM')>
Traceback (most recent call last):
  File "/srv/jupyterhub-ssh/jupyterhub_ssh/__init__.py", line 144, in _handle_stdin
    data = await stdin.read(4096)
  File "/home/jovyan/.local/lib/python3.8/site-packages/asyncssh/stream.py", line 122, in read
    return await self._session.read(n, self._datatype, exact=False)
  File "/home/jovyan/.local/lib/python3.8/site-packages/asyncssh/stream.py", line 486, in read
    raise exc
asyncssh.misc.SignalReceived: Signal: TERM

Is it connected with the lack of support for tunneling? Perhaps, I could also take a look on it.

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

3 participants