VIM + netrw: accessing a machine behind a gateway

1

I'd like to setup a vim session to edit some files on a machine behind an ssh gateway. Is this possible?

To access the files via the command line, I have to do:

mycomputer$ ssh gateway
gateway$ ssh othermachine
othermachine$ vim file

The gateway machine does not allow normal ssh forwarding:

> nc
rbash: nc: command not found
> /usr/bin/nc   
rbash: /usr/bin/nc: restricted: cannot specify `/' in command names

keflavich

Posted 2014-02-16T12:40:14.617

Reputation: 373

1

Have you seen this; it does require nc on the gateway, though.

– Ingo Karkat – 2014-02-16T16:37:12.503

Answers

1

Netrw has a "g:netrw_scp_cmd" variable; I wonder if there's something you could set it to that would use the gateway; something like "ssh gateway 'scp -q'". I don't have a gateway setup to test this idea; you'll have to play with it.

user21497

Posted 2014-02-16T12:40:14.617

Reputation: 216