SFTP没有保持连接活着

时间:2018-04-29 01:41:50

标签: sftp sublimetext connection-timeout

我正在寻找一种方法来保持我的ftp连接超时,如果可能的话,在我的项目工作时保持打开几个小时

在Sublime Text 2中,我正在使用这个包“SFTP”

https://wbond.net/sublime_packages/sftp

当我将文件上传到我的服务器时,通常需要大约30秒才能重新连接,然后上传文件。如果我然后立即再次保存文件,它是瞬间的。我已设置选项以保持连接活动但它们似乎不起作用。

“connect_timeout”:1800,
“keepalive”:1800,

{
    // 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": "ftp",

    "save_before_upload": true,
    "upload_on_save": true,
    "sync_down_on_open": false,
    "sync_skip_deletes": false,
    "sync_same_age": true,
    "confirm_downloads": false,
    "confirm_sync": true,
    "confirm_overwrite_newer": false,

    "host": "example.com",
    "user": "username",
    "password": "password",
    "remote_path": "/public_html/example/wp-content/plugins/",

    "ignore_regexes": [
        "\\.sublime-(project|workspace)", "sftp-config(-alt\\d?)?\\.json",
        "sftp-settings\\.json", "/venv/", "\\.svn/", "\\.hg/", "\\.git/",
        "\\.bzr", "_darcs", "CVS", "\\.DS_Store", "Thumbs\\.db", "desktop\\.ini"
    ],
    //"file_permissions": "664",
    //"dir_permissions": "775",

    //"extra_list_connections": 0,

    "connect_timeout": 1800,
    "keepalive": 1800,
    //"ftp_passive_mode": true,
    //"ftp_obey_passive_host": false,
    //"ssh_key_file": "~/.ssh/id_rsa",
    //"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,
}

0 个答案:

没有答案