2015-09-28 53 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时,它没有要求输入我的密码。这很奇怪。 –