使用SublimeText SFTP上传到EC2的CentOS实例 [英] Uploading to EC2 CentOS instance using SublimeText SFTP

查看:681
本文介绍了使用SublimeText SFTP上传到EC2的CentOS实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个EC2的CentOS实例来承载我的PHP Web应用程序的开发版本,我使用的是崇高的文本作为一个IDE,以及SFTP插件来上传文件,然后直接测试。

I created an EC2 CentOS instance to host my php web app development version, I'm using Sublime Text as an IDE, and SFTP plugin to upload files directly then test.

在,我是用SFTP使用用户名/密码/端口22来连接

Before, I was using SFTP with username/password/port 22 to connect

现在,我有PEM文件,我已经用它来安装和配置一些组件。我怎样才能通过连接崇高文字SFTP插件使用PEM文件和上传文件?

Now, I have the PEM file, and I already used it to install and configure some component. How can I connect using the PEM file and upload file via Sublime Text SFTP plugin?

我在SFTP-config.json规定:

I specified in sftp-config.json:

"ssh_key_file": "/home/USER/USER-EC-Virginia.pem",

但没有成功,我得到连接超时消息。

but without any success, I get Connection timeout message.

22号端口已经允许接收的流量。

Port 22 already allowed to receive traffic.

编辑: 我试图用PPK文件SublimeText,我仍然得到同样的:超时错误

I tried to use PPK file with SublimeText and I'm still getting the same : Timeout error.

推荐答案

您已经接近...为CentOS / RHEL以下工作在EC2上

You're close...the following works for CentOS / RHEL on EC2

{
    "type": "sftp",
    "sync_down_on_open": true,
    "host": "<your ec2 instance hostname>",
    "user": "<your username>",
    "remote_path": "<your remote path>",
    "connect_timeout": 30,
    "sftp_flags": ["-o IdentityFile=~<path to .pem file>"]
}

您其实并不需要设置 ssh_key_file传递:/home/USER/USER-EC-Virginia.pem,

这篇关于使用SublimeText SFTP上传到EC2的CentOS实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆