I wish to use netrw :Explore on a remote server via ssh tunnelling, but can't manage to do it.

I can access the server perfectly fine using ssh and remotely edit files with vim:

vim scp://userid@hostname//path/to/filename

works fine for me. However when I try to work with directory the userid / hostname seems to go completely wrong:

vim scp://userid@hostname//path/to/directory/

is interpreted as @userid@hostname (not the usual scp -q 'userid@hostname:/path/to/file' I usually get with a file), so I get a permission denied (publickey,password).

What should I do to get access to the directory (or to use :Explore, the problem being the same).

  • What if you leave off the trailing slash? Interesting q – D. Ben Knoble Oct 8 '20 at 13:08
  • Unfortunately that doesn't work. If I remove the trailing slash: vim scp://userid@hostname//path/to/directory vim just create a new file. – Iel Oct 9 '20 at 7:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.