Skip to content

Unable to connect via SSH with keyfile #14102

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

Closed
shdwchn10 opened this issue Sep 1, 2024 · 3 comments · Fixed by #15499
Closed

Unable to connect via SSH with keyfile #14102

shdwchn10 opened this issue Sep 1, 2024 · 3 comments · Fixed by #15499
Labels
remote issues related to the remote functionality remote-ssh issues related to the ssh remote functionality

Comments

@shdwchn10
Copy link

Bug Description:

I have a lot of hosts entries in ~/.ssh/config like this one:

Host pc
    Hostname 192.168.100.11
    Port 22
    User shdwchn10
    Compression yes
    IdentityFile ~/.ssh/pc

And I'm unable to connect to any of them via Theia (Linux, Appimage). ssh in terminal works fine.

Steps to Reproduce:

  1. Have some systems with Host entry in ~/.ssh/config file (each system in this file doesn't allow password login)
  2. Try to connect to any of them with username@ip
  3. Error: Could not open SSH connection to remote. All configured authentication methods failed
  4. Or try to connect with the host name (from ~/.ssh/config): pc and enter username in the second prompt
  5. Error: Could not open SSH connection to remote. getaddrinfo ENOTFOUND pc
  6. If I try to enter just the host name without username in the second prompt (like it works in ssh cli: ssh pc) I get this error: Please enter a user name.

image
username@ip connection error. Error from logs:

2024-09-01T16:30:34.013Z root INFO Ended remote connection to host 'shdwchn10@192.168.100.11'

image
pc connection error (logs are empty)

image
pc without username error (logs are empty)

Additional Information

  • Operating System: Fedora Linux 40.20240828.0 (Silverblue)
  • Theia Version: 1.52.0
@msujew msujew added remote-ssh issues related to the ssh remote functionality remote issues related to the remote functionality labels Sep 2, 2024
@ensignavenger
Copy link

From what I can tell, there is no work around to specify a port and identity file currently? I am going to attempt to use the alternative plugin mentioned in #14289 for the time being.

@ensignavenger
Copy link

I am going to attempt to use the alternative plugin mentioned in #14289 for the time being.

Hmm, that extension doesn't seem to work in Theia. :(

@msujew
Copy link
Member

msujew commented Dec 9, 2024

Hmm, that extension doesn't seem to work in Theia. :(

The extension attempts to download VS code to the remote machine for Theia to connect to. This doesn't work for numerous technical reasons, so we don't even attempt to support that.

specify a port

You can specifiy a port in the URL to remote into. That should generally work, see #13296.

Feel free to open a PR for better identity/keyfile support. I'm currently pretty busy, so I don't have time to work on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
remote issues related to the remote functionality remote-ssh issues related to the ssh remote functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants