vim-sftp-sync icon indicating copy to clipboard operation
vim-sftp-sync copied to clipboard

Can I use aws pem key in vim-sftp-sync?

Open bartkim0426 opened this issue 7 years ago • 3 comments

I'm trying to use sftp sync with my remote aws server. I have my public key in .ssh dir, so my config is

let g:vim_sftp_configs = {
\       'ticketk' : {
\    	'upload_on_save'   : 1,
\    	'download_on_open' : 0,
\    	'confirm_downloads': 1,
\    	'confirm_uploads'  : 0,
\		'local_base_path'  : '/Users/path/to/my/dir',
\		'remote_base_path' : '/home/ubuntu/',
\		'sftp_command' : 'sftp',
\		'user' : 'myusername',
\		'pass' : 'mypassword',
\		'host' : '13.124.xxx.xx',
\		'ssh_key_file': '~/path/to/my/pem_file.pem',
\	},
\}

Is it correct way to add 'ssh_key_file': '~/path/to/my/pem_file.pem', to my config or anything else? or I can't use pem key files in vim-sftp-sync? Anyway, it's really convenient and great. thx

bartkim0426 avatar Jun 17 '17 13:06 bartkim0426

Oh when i try to down/upload files, I got this

Press ENTER or type command to continue
spawn sftp xx.xxx.xxx.xx
Permission denied (publickey).

Connection closed

bartkim0426 avatar Jun 17 '17 13:06 bartkim0426

Also I can directly access to my server with pem files (chmod 400) in terminal. I think it's not a pem permission problem

bartkim0426 avatar Jun 17 '17 13:06 bartkim0426

@bartkim0426 I have same problem. but i`ve solved it.

let g:vim_sftp_configs = {
\       'ticketk' : {
\    	'upload_on_save'   : 1,
\    	'download_on_open' : 0,
\    	'confirm_downloads': 1,
\    	'confirm_uploads'  : 0,
\		'local_base_path'  : '/Users/path/to/my/dir',
\		'remote_base_path' : '/home/ubuntu/',
\		'sftp_command' : 'sftp',
\		'user' : 'myusername',
\		'host' : '-P22 -i /User/path/to/my/pem_file.pem 13.124.xxx.xx',
\	},
\}

you can try it 🗡 have a good day!

keiraydev avatar Feb 10 '19 08:02 keiraydev