ctrl+shift+p->pci(package control install package)->sftp(下載sftp插件)
看到網絡上有的教程是如下圖設置,但是無法保存。
2018-04-19_131853.png
于是進行第二種方法,根目錄右鍵矾屯,打開之后
2018-04-19_132117.png
主要設置host,user,password,port,remote_path
例如 host:40.125.208.172
user:grace
password:admin
port sftp默認22
要確保能連接上哦少梁,
remote_path:'/www/wwwroot/40.125.208.172/',這個是遠程服務器路徑
碰到的幾個報錯擎值,例如can't not find folder骑素,permission denied,然后又是各種查資料,有的確實是因為權限不夠或是什么的冀墨,但是我這個結果后面發(fā)現(xiàn)是remote_path路徑寫錯了闸衫。
在文件中右鍵,然后就可以對文件進行操作啦诽嘉。
2018-04-19_133453.png
有時候會提示sftp要購買什么的蔚出,可以在如下圖所示設置
2018-04-19_134340.png
找到的資料
{
"email": "xiaosong@xiaosong.me",
"product_key": "d419f6-de89e9-0aae59-2acea1-07f92a"
}
{
{
// 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",
"save_before_upload": true,//上傳前保存在本地
"upload_on_save": false, //保存時是否自動上傳,否
"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",
//"port": "22",
"remote_path": "/example/path/",
"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": 30,
//"keepalive": 120,
//"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,
}
}