Vim SCP parameter with private public key pair
Solution 1:
I haven't got Vim's netrw
plugin, but try the following.
Create an ssh client config file for your host. Put the following in $HOME/.ssh/config
:
Host myserveralias
Hostname ec-address
User user
IdentityFile /path/to/keyfile
PasswordAuthentication no
Replace the values according to your host of course. Then login using an scp URL like this:
:e scp://myserveralias//
Most ssh cliets on Linux honour the client configuration file (also a sytem-wide one in /etc/ssh/ssh_config
(not to be confused with sshd_config
). I hope your plugin will do so too. For more configuration options see man ssh_config
. Debugging using ssh -vvv
usually helps you out.