Search code examples
jsonsshkeysublimetext3

Sublime text sftp rsa private key


I'm trying to set up a private rsa key for sublime text to access the ftp like in filezilla. So far so good, the plugin stfp/ftp is working fine, but I've no idea on how I can set up the key to access a private server.

Here's an example of my json file:

"type": "sftp",

"sync_down_on_open": true,
"sync_same_age": true,

"host": "example.com",
"user": "username",
"password": "password",
"port": "22",

"remote_path": "/example/path/",
//"file_permissions": "664",
//"dir_permissions": "775",

"connect_timeout": 30,

"ssh_key_file": "~/.ssh/id_rsa",

So the thing is that this snippet "ssh_key_file": "~/.ssh/id_rsa" should do the work but I need to know: 1. Where I should put the file that I have (key.ppk) and 2. Do I need something else to make it works?

Thank you in advance for any help.


Solution

  • It's actually doable:

    {
        // The tab key will cycle through the settings when first created
        // Visit http://wbond.net/sublime_packages/sftp/settings for help
    
        // sftp, ftp or ftps
        "type": "sftp",
    
        "sync_down_on_open": true,
        "sync_same_age": true,
    
        "host": "111.111.111.11",
        "user": "admin",
        "password": "password",
        "port": "22",
    
        "remote_path": "/",
        //"file_permissions": "664",
        //"dir_permissions": "775",
    
        //"extra_list_connections": 0,
    
        "connect_timeout": 30,
        //"keepalive": 120,
        //"ftp_passive_mode": true,
        //"ftp_obey_passive_host": false,
        "ssh_key_file": "C:/Program Files/Sublime Text 3/mykey.ppk",
        //"sftp_flags": ["-F", "/path/to/ssh_config"],
    
        //"preserve_modification_times": false,
        //"remote_time_offset_in_hours": 0,
        //"remote_encoding": "utf-8",
        //"remote_locale": "C",
        //"allow_config_upload": false,
    }