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

[Session(-7)] Unable to send userauth-none request #77

Closed
ldmax opened this issue Jan 4, 2023 · 2 comments
Closed

[Session(-7)] Unable to send userauth-none request #77

ldmax opened this issue Jan 4, 2023 · 2 comments
Labels
bug Something isn't working inactive No discussion on issue in awhile old Issue is really old, so may no longer apply question Further information is requested

Comments

@ldmax
Copy link

ldmax commented Jan 4, 2023

Hi chipsenkbeil, thanks for this great plugin!

I was trying to use distant.nvim to connect from my company laptop to production server, with a jump machine in-between.

Company laptop OS: win10
Jump machine OS:

NAME="SLES"
VERSION="12-SP5"
VERSION_ID="12.5"
PRETTY_NAME="SUSE Linux Enterprise Server 12 SP5"
ID="sles"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:12:sp5"

Production machine OS:
NAME="SLES"
VERSION="15-SP3"
VERSION_ID="15.3"
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP3"
ID="sles"
ID_LIKE="suse"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:15:sp3"
DOCUMENTATION_URL="https://documentation.suse.com/"

distant.nvim: branch v0.2 latest commit

I'm able to download Rust library on local machine and put distant-linux64-gnu-x86 to production machine ~/bin/distant/.

Here's my set up for distant:

local distant_status_ok, distant = pcall(require, "distant")
if not distant_status_ok then
  return
end

local actions = require('distant.nav.actions')

distant.setup {
  ['*'] = {
    distant = {
      args = { '--shutdown', 'lonely=60' },
      bin = '~/bin/distant/distant',
    },
    file = {
      mappings = {
        ['-'] = actions.up,
      },
    },
    dir = {
      mappings = {
        ['<Return>'] = actions.edit,
        ['-']        = actions.up,
        ['K']        = actions.mkdir,
        ['N']        = actions.newfile,
        ['R']        = actions.rename,
        ['D']        = actions.remove,
      }
    },
    ssh = {
      user = 'mxxxxxx'
    }
  },
  -- OLD PROD
  ['deda1x2699'] = {
    ssh = {
      proxy_command = "ssh nxuser -W %h:%p"
    }
  },
  -- M2 VAL
  ['deda1x3128'] = {
    ssh = {
      proxy_command = "ssh nxuser -W %h:%p"
    }
  },
  -- M2 PROD
  ['deda1x3766'] = {
    ssh = {
      proxy_command = "ssh nxuser -W %h:%p"
    }
  },
  ['deda1x3388'] = {
    ssh = {
      proxy_command = "ssh nxuser -W %h:%p"
    }
  },
  -- HPC PROD
  ['deda1x3155'] = {
    ssh = {
      proxy_command = "ssh nxuser -W %h:%p"
    }
  },
  -- HPC Test
  ['deda1x3035'] = {
    ssh = {
      proxy_command = "ssh nxuser -W %h:%p"
    }
  },
  -- M22 Test
  ['deda1x3390'] = {
    ssh = {
      proxy_command = "ssh nxuser -W %h:%p"
    }
  },
  -- R421 Test
  ['deda1x4746'] = {
    ssh = {
      proxy_command = "ssh nxuser -W %h:%p"
    }
  },
  ['deda1x4783'] = {
    ssh = {
      proxy_command = "ssh nxuser -W %h:%p"
    }
  },
  -- R421 VAL
  ['deda1x4747'] = {
    ssh = {
      proxy_command = "ssh nxuser -W %h:%p"
    }
  },
}

Here's what I do:
I want to connect to deda1x4746 (production machine), which requires to connect to nxuser (jump machine) first.
NOTE: ~/bin/distant/ is shared across jump machine and deda1x4746
step 1: type ":DistantLaunch deda1x4746" -- a prompt shows up (see below); I assume this is password prompt for jump machine; I entered my password three times
image
image
image

step 2: another prompt asking me to enter password for deda1x4746 shows up; I entered password for deda1x4746 once; an error message shows up (see below)
image
image

I also tried :DistantConnect deda1x4746:22, I got
image

Would it be possible that you could give me some advice? Thanks!

@chipsenkbeil
Copy link
Owner

@ldmax thank you for the detailed report! I've not actually tried a jump host before. Does the final result require you to tunnel traffic through nxuser once the distant server has been spawned? Or would you be connecting via TCP directly from your laptop to deda1x4746 and other instances?

If it's the former, then you'd want to use DistantConnect ssh://... to only use ssh and not the distant server itself as distant does not (yet) support tunneling TCP connections. Even with that, there may be an issue with the ssh backend we use (there are two different backends available), and you can try changing the backend during DistantConnect options="ssh.backend=libssh" IIRC.

@chipsenkbeil chipsenkbeil added bug Something isn't working question Further information is requested labels Jan 4, 2023
@chipsenkbeil chipsenkbeil added inactive No discussion on issue in awhile old Issue is really old, so may no longer apply labels May 15, 2023
@chipsenkbeil
Copy link
Owner

Closing out as an outdated issue. You can try switching the ssh library to libssh as mentioned above. This may also get resolved with chipsenkbeil/distant#193 for distant.

Nothing else that can be done in the neovim plugin itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working inactive No discussion on issue in awhile old Issue is really old, so may no longer apply question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants