【问题标题】:Sublime text sftp rsa private keySublime text sftp rsa 私钥
【发布时间】:2018-02-23 13:45:32
【问题描述】:

我正在尝试为 sublime 文本设置一个私有 rsa 密钥,以便像在 filezilla 中一样访问 ftp。到目前为止一切顺利,插件 stfp/ftp 工作正常,但我不知道如何设置访问私有服务器的密钥。

这是我的 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",

所以问题是这个 sn-p "ssh_key_file": "~/.ssh/id_rsa" 应该做的工作,但我需要知道: 1. 我应该把我拥有的文件放在哪里(key.ppk)和 2. 我是否需要其他东西才能让它发挥作用?

提前感谢您的帮助。

【问题讨论】:

    标签: json ssh key sublimetext3


    【解决方案1】:

    实际上是可行的:

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

    【讨论】:

      【解决方案2】:

      崇高文本 3 (v 3.2.2)

      终于成功了,把.ppk文件移到没有空格的路径下。

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-04-07
        • 2011-03-20
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多