3

I can edit remotely a file located on Machine_1 using

vim name@Machine_1/file_1.txt

It uses my .vimrc, plugins and everything is great. However, there is also a Machine_2 in the history, that can only be accessed through Machine_1...

I can edit the desired files on Machine_2 using

ssh login@Machine_1

and from there

ssh login2@Machine_2

but all my plugins and settings won't be used, and that is not what I want... :(

Is there any way to access the file_2.txt located on Machine_2 through Vim, on my local Machine?

Also note that I don't own any of the two machines and also don't have physical access to them nor administrator powers.

Xaphanius
  • 139
  • 3
  • 2
    Have you tried http://unix.stackexchange.com/q/41493/70524 / http://askubuntu.com/a/311454/158442? – muru Feb 24 '16 at 03:16
  • 1
    I think you can also setup a ssh tunnel on your local machine with something like: ssh -fNp 22 username@machine1 -L 2844/machine2/22; you can then use ssh -p 2844 localhost to ssh to machine2 (it's been years since I did this, so the command may not be 100% correct). In any case, this looks like a ssh question, and not really a Vim question. – Martin Tournoij Feb 24 '16 at 11:40
  • 2
    I'm voting to close this question as off-topic because it is not about Vim, but about ssh. – Martin Tournoij Feb 24 '16 at 11:40
  • @muru I don't think that it is a solution for my problem... All I want is to edit a file on Machine_2 using Vim and the configuration files located on "Machine_0". @Carpetsmoker It is not really about SSH, I believe. What I am asking is if there a way to do something similar to vim scp://name@Machine_2:122//home/myfile.txt direct from Machine_0 – Xaphanius Feb 24 '16 at 23:29
  • @Xaphanius it is. When you do vim scp://, Vim is using SSH to connect to the target system. And how SSH connects to it is, of course, governed by your SSH settings. So, if you configure SSH so that you can SSH to Machin_2 from Machine_0, Vim will follow. – muru Feb 25 '16 at 02:01

0 Answers0