简体   繁体   English

崇高的文本 sftp rsa 私钥

[英]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.我正在尝试为 sublime text 设置一个私有的 rsa 密钥来访问 ftp,就像在 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.到目前为止一切顺利,插件 stfp/ftp 工作正常,但我不知道如何设置访问私有服务器的密钥。

Here's an example of my json file:这是我的 json 文件的示例:

"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?所以问题是这个片段 "ssh_key_file": "~/.ssh/id_rsa" 应该做这项工作,但我需要知道: 1. 我应该把我拥有的文件 (key.ppk) 放在哪里 2. 我做需要其他东西来使它工作吗?

Thank you in advance for any help.提前感谢您的任何帮助。

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,
}

Sublime Text 3 (v 3.2.2) Sublime Text 3 (v 3.2.2)

Finally succeeded, moving the .ppk file to a path without spaces.终于成功了,将 .ppk 文件移动到一个没有空格的路径。

"ssh_key_file": "C:/Users/Me/mykey.ppk"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM