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

ssh alias not readable? #133

Open
BazBerger opened this issue May 16, 2024 · 4 comments
Open

ssh alias not readable? #133

BazBerger opened this issue May 16, 2024 · 4 comments

Comments

@BazBerger
Copy link

When calling my ssh aliases from my config using the following command:
distant launch remoteName
I'm getting the following error returned to me:

Failed to connect to server

Caused by:
    remoteName needs to be resolvable outside of ssh: failed to lookup address information: Try again

I've also tried using the command:
:DistantLaunch remoteName mode=ssh
Within neovim but that is less useful and only returns a "Exited unexpectedly: exit code 1"

Any help on how to proceed from here would be fantastic. If you require any further info please let me know and I'll post it here too
Thanks!

@chipsenkbeil
Copy link
Owner

ssh aliases aren't supported yet, as discussed in #63 and #58.

I believe this will become available after chipsenkbeil/distant#193.

@BazBerger
Copy link
Author

I have to ssh via a gateway. Is there a way in distant to stack ssh commands? ie to the gateway and then the remote server?

@chipsenkbeil
Copy link
Owner

I have to ssh via a gateway. Is there a way in distant to stack ssh commands? ie to the gateway and then the remote server?

What I'd try to do is use ssh TCP forwarding to expose a port on my local machine that goes to a port on the final machine that is the ssh server, such as ssh -L 2222:destination.server:22 user@intermediate.server. From there, you can connect via :DistantConnect ssh://127.0.0.1:2222 or distant connect ssh://127.0.0.1:2222.

@DelinQu
Copy link

DelinQu commented Jun 2, 2024

Hi chipsenkbeil
Thanks for your awesome plugin and effort. I'm using distant-vim for a stable connection and corresponding speed. In my case,l use an ssh alias, which is not supported currently. moreover, must jump by another management server with KeyAlgorithms options to my remote server:

Host jump-s1
HostName intermediate.server
User user@ user@destination.server
HostKeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa

The DistantLaunch can't work properly withDistantLaunch jump-s1 with DistantLaunch ssh:jump-s1 or DistantLaunch ssh:user@user@destination.server@intermediate.server -o HostKeyAlgorithms=+ssh-rsa -o PubkeyA cceptedAlgorithms=+ssh-rsa, is there any alternative way to connect the remote server? or is it notcompatible with distant nvim?

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