scp, ssh] Open remote machine’s files in Midnight Commander (MC) and Vimssh-agent and ssh-addGot into the habit of adding a passphrase to private
keys, so ssh commands will keep asking for it
every time.
ssh-agent
solves this problem, and makes sure that passphrase
popups won’t interrupt.
Open tmux
cd to project
ssh-agent vim -S Session.vim
In Vim, :!ssh-add
Continue with either Vim or Midnight Commander (or both)
scp in `Midnight CommanderAs of version 4.8.23:
Open either Left or Right on the top menu
(press F9 if using mouse is not an option)
Select Shell link...
Type in the connection in the format
username@hostname (e.g., lofa@1.2.3.4)
Mostly taken from here . There is this question asking how to make this permanent.
Using
:Lexplore scp://<server>/<path>
For example:
:Lexplore scp://1.2.3.4//home/toraritte/clones/
The extra / (instead of the :) is crucial!
Type :h scp for more info (which is an alias to
:h netrw).
Prefer using Lexplore (see :h Lexplore) because
it gives the layout I prefer (i.e., a fixed vertical
file browser on the left).
Whenever I select a file the Vim tab gets messed up
upon opening (e.g., the file browser split becomes
blank, the opened file’s lines show up funky), so
just press CTRL-L to redraw
the screen (see :h CTRL-L).