On 8/9/19 4:17 AM, Walter Cazzola wrote:
I'm already used to "gvim scp://host+path" but in this case the remote server can be accessed only through one other machine and I've to do a tunnel to edit them.

I've already tried to add to my .vimrc

   let g:netrw_scp_cmd="scp -q -oProxyCommand=\"ssh -W %h:%p tunnel-host\""

but it didn't work. I googled around but seems that this problem never raised.

I'm still on vim 7.4 and I'm using a version of openssh older than 7.3 (this is why I'm still using ProxyCommand instead of ProxyJump). Unfortunately to update my linux-box is not an option in the near future.

Any idea?

Yes.

Teach OpenSSH how to get to the host by putting entries in the OpenSSH /client/ configuration file; ~/.ssh/config or system wide /etc/ssh/ssh_config. E.g.

Host targetHost
        ProxyCommand ssh -W %h:%p tunnel-host

Host tunnel-host
        # any options you might want here

This teaches any and all OpenSSH clients how to get to targetHost without needing to specify additional command line options. I.e. you can run the following command:

   gvim scp://targetHost+path

(G)vim doesn't need to worry about /how/ scp connects. OpenSSH's scp command deals with that transparently.

IMHO the OpenSSH /client/ configuration file opens up a world of possibilities.

Link - Empowering OpenSSH
- https://dotfiles.tnetconsulting.net/articles/2015/0506/empowering-openssh.html



--
Grant. . . .
unix || die

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/303379b3-8f69-7dbd-cb9a-ab3f20fd1073%40spamtrap.tnetconsulting.net.

Reply via email to