2015-09-28 97 views
1

我有,我想與SFTP包崇高的文本3無法通過崇高3包SFTP

連接出於某種原因,SFTP服務器連接到SFTP服務器,我得到一個超時每次我嘗試連接到它。 SSH密鑰設置正確,我可以使用WinSCP,FileZilla和PuTTy連接到服務器。

以下是錯誤:

Connecting to SFTP server "pirpi.pil.dk" as "devafdoede" ....... failure (Connection timeout) 

這只是不希望連接的崇高SFTP包。下面是我的配置:

{ 
// 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": "pirpi.pil.dk", 
"user": "devafdoede", 
//"password": "password", 
//"port": "22", 

"remote_path": "/mypath", 
"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, 
} 

回答

3

您需要添加特定ssh_key_file,如果你使用的是Windows。

從SFTP常見問題:

For Windows, Sublime SFTP uses PSFTP, which is released alongside PuTTY. Any key loaded into Pageant will automatically be used. It is also possible to supply a .ppk private key file as the ssh_key_file setting for an SFTP remote. .ppk files can be generated from scratch, or an existing OpenSSH private key, via PuTTYgen. All of these utilities can be downloaded from the PuTTY site, however none are required for Sublime SFTP to fully function.

您需要創建的puttygen和開放的盛會你的私鑰文件,並選擇的關鍵。

更多在這裏閱讀: http://wbond.net/sublime_packages/sftp/faq#SSHKeys http://the.earth.li/~sgtatham/putty/0.61/htmldoc/Chapter9.html#pageant

您需要在您的SFTP配置指定ssh_key

+0

這工作就像一個魅力,非常感謝! – SimeriaIonut

+1

應該在你的'server' config和'sftp-config'文件中聲明兩次 – NineCattoRules

+0

我有兩個版本:id_rsa和id_rsa.ppk。我用非ppk版本立即獲得(連接超時)。所以我切換到Sublime的SFTP配置中的.ppk版本,現在它可以工作。然後,我切換回非ppk版本,並且現在也可以與該版本一起使用!?...我的私鑰受密碼保護。當我切換到.ppk版本時,它只會詢問我的密碼。當我切換回非ppk時,它沒有要求輸入我的密碼。這很奇怪。 –