Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime text SFTP on EC2

I use Sublime text SFTP to work on my remote servers, and when I hit Ctrl-S, it uploads automatically to the remote. However, on my EC2 server, Ctrl-S only saves the local temp file, and I need to use the context menu SFTP > Upload File to save.

Any options to enable the remote save on ctrl-s?

Here's the config.json I use :

"type": "sftp",
"sync_down_on_open": true,
"sync_same_age": true,
"host": "xxx.amazonaws.com",
"user": "xxx",
"remote_path": "/var/www",
"connect_timeout": 30,
"ftp_passive_mode": true,
"ssh_key_file": "D:\\xxx.ppk",
"remote_time_offset_in_hours": 1,

I tried the following : "save_before_upload": true, "upload_on_save": true, sftp_flags instead of ssh_key_file but nothing has worked so far

like image 294
xShirase Avatar asked Mar 22 '14 16:03

xShirase


3 Answers

Hope this helps you, it worked for me.

{
    "type": "sftp",
    "sync_down_on_open": true,
    "host": "<your ec2 instance hostname>",
    "user": "<your username>",
    "remote_path": "<your remote path>",
    "connect_timeout": 30,
    "sftp_flags": ["-o IdentityFile=~<path to .pem file>"]
}

See: https://stackoverflow.com/a/17310355/1858217

like image 55
Andrew Gable Avatar answered Nov 16 '22 04:11

Andrew Gable


Use sftp_flags as following, it should work.

"sftp_flags": ["-i", "/Users/username/pemfile.pem"],
like image 23
Bandu M Avatar answered Nov 16 '22 02:11

Bandu M


In windows you should use this syntax.

"ssh_key_file": "/Users/Diego/Documents/SSH/Key.ppk",

like image 2
Diego Fernando Lara Avatar answered Nov 16 '22 04:11

Diego Fernando Lara