Best way to work over SSH (~250ms)

-1

0

The server in question gives a pretty terrible latency of 250ms since it's on the other side of the globe. Now I'm supposed to develop software in that server, and as you'd guess, it's pretty frustrating to code in vim with 250ms latency.

So apart from the obvious solution of copying the file in question into my local system, editing, and copying it back; is there any other seamless solution to this problem? How do the pros do it?

user1265125

Posted 2014-07-15T04:41:11.467

Reputation: 183

You are committing your code to a version control system anyhow (if you are not, you are doing it wrong), so why not commit from your local machine and pull from the remote machine? – bjanssen – 2014-07-15T05:51:06.510

agree, I would use GIT or some such, and just push and pull when done with a bit of code – Sverre – 2014-07-15T06:48:20.577

@bjanssen: I'm working inside an enterprise provided VM, which is authorized for our proprietory build system, SDE tools etc. It cannot be deployed on my local machine. Need to setup the entire development environment inside that VM and develop around that. So yeah, it's not a simple matter of push and pull when you need to test your code inside some environment which would take you weeks to setup on your local machine. – user1265125 – 2014-07-15T08:11:26.687

Answers

1

Maybe mosh would help you with the echo delay?

There really is nothing you can do about the latency - it's a physical limitation. You (probably) can't make your bits travel faster than they do.

Another alternative would be something like sshfs - mounting a remote file system as if it was mounted in the local host. You would benefit from the operating system cache, and you could edit locally the remote files as if they were in the local filesystem (with the tools available in your host). You would have the delay of initially fetching the file, but you have your own editor and environment available while making remote changes.

  • Install sshfs (you will need fuse available in your kernel)
  • Mount the remote host:

    sshfs user@host.example.com:~/dev ~/sshfs/host.example.com

and you're done. cd to ~/sshfs/host.example.com, and you're good to go!

To umount an sshfs mountpoint, fusermount -u ~/sshfs/host.example.com.

Valmiky Arquissandas

Posted 2014-07-15T04:41:11.467

Reputation: 1 770

That's not what I asked at all. The situation is ~250ms latency. I'm asking how can I make working in it less painful. Maybe some automated method in which a file which I want to edit in the remote server opens locally, and when saved automatically gets pushed to the remote server? Some clever solution like that. – user1265125 – 2014-07-15T04:54:54.300

I see. Maybe what you need is sshfs, I'll update the answer accordingly. – Valmiky Arquissandas – 2014-07-15T05:04:04.673