stevearc / oil.nvim

Neovim file explorer: edit your filesystem like a buffer
MIT License
3.83k stars 109 forks source link

feature request: Can we get more info on how to use SSH? #431

Open kuro337 opened 3 months ago

kuro337 commented 3 months ago

Did you check existing requests?

Describe the feature

I am trying to use oil - to edit files over ssh on a server.

The readme.md specifies this -

nvim oil-ssh://[username@]hostname[:port]/[path]

Searching through the issues I'm not sure what to make of it too -

for example - I added the package


require("lazy").setup({
    { 'stevearc/oil.nvim',  opts = {},     dependencies = { "nvim-tree/nvim-web-devicons" } }
   },
})

require("oil").setup()

nvim oil-ssh://myuser@192.xx.xx.xx//home/user/file.txt

Is this all that is needed for it to work?

The loading.... pops up and then I see this window pops up - but nothing happens.

Screenshot 2024-07-01 at 9 55 08 PM

Am I missing some steps - once this floating window pops up am I required to do something?

Would appreciate any help/pointers!

Provide background

I am trying to use oil - to edit files over ssh on a server.

From macos to a linux server

What is the significance of this feature?

cannot use this plugin without it

Additional details

No response

stevearc commented 3 months ago

Try just opening a directory first

nvim oil-ssh://myuser@192.xx.xx.xx/

If the ssh operation takes too long, oil opens up a floating window with the terminal that contains the commands that are being executed. If you see it stalled at ssh 192.xx.xx.xx, that means that something about the ssh command has stalled. Try executing that command by itself in a terminal and see if you can figure out what the issue is.

Note that for smoothest operation you will want to ensure that you have configured your ssh client and server to use public/private keys so that you don't have to enter your password every time.