无法通过 Sublime 3 Package SFTP 连接到 SFTP 服务器
Can't connect to SFTP server through Sublime 3 Package SFTP
我有一个 SFTP 服务器,我想使用 Sublime Text 3 中的 SFTP 包连接它。
出于某种原因,我每次尝试连接时都会超时。 SSH 密钥设置正确,我也可以使用 WinSCP、FileZilla 和 PuTTy 连接到服务器。
这里是错误:
Connecting to SFTP server "pirpi.pil.dk" as "devafdoede" ....... failure (Connection timeout)
只是Sublime 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,
}
如果您使用 windows,则需要添加特定的 ssh_key_file
。
来自 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 创建私钥文件并打开 Pageant 和 select 密钥。
在此处阅读更多内容:
http://wbond.net/sublime_packages/sftp/faq#SSHKeys
http://the.earth.li/~sgtatham/putty/0.61/htmldoc/Chapter9.html#pageant
您需要在您的 sftp 配置中指定 ssh_key
我有一个 SFTP 服务器,我想使用 Sublime Text 3 中的 SFTP 包连接它。
出于某种原因,我每次尝试连接时都会超时。 SSH 密钥设置正确,我也可以使用 WinSCP、FileZilla 和 PuTTy 连接到服务器。
这里是错误:
Connecting to SFTP server "pirpi.pil.dk" as "devafdoede" ....... failure (Connection timeout)
只是Sublime 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,
}
如果您使用 windows,则需要添加特定的 ssh_key_file
。
来自 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 创建私钥文件并打开 Pageant 和 select 密钥。
在此处阅读更多内容: http://wbond.net/sublime_packages/sftp/faq#SSHKeys http://the.earth.li/~sgtatham/putty/0.61/htmldoc/Chapter9.html#pageant
您需要在您的 sftp 配置中指定 ssh_key