我正在尝试为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",
所以问题是这个片段“ssh_key_file”:“〜/ .ssh / id_rsa”应该做的工作,但我需要知道:1。我应该把文件放在哪里(key.ppk)和2我需要别的东西让它有效吗?
提前感谢您的帮助。
答案 0 :(得分: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,
}
答案 1 :(得分:0)
崇高文字3(v 3.2.2)
最终成功,将.ppk文件移动到没有空格的路径。
"ssh_key_file": "C:/Users/Me/mykey.ppk"