如何配置科达工作,为我的Amazon EC2实例? [英] How do configure Coda to work for my Amazon EC2 instance?

查看:188
本文介绍了如何配置科达工作,为我的Amazon EC2实例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法连接到我的EC2 instane。我在AWS控制台打开端口21。我认为这是没有办法的输入我的SSH密钥对科达。有没有连接科达到我的EC2实例的方式?

I can not connect to my EC2 instane. I have opened port 21 in the AWS Console. I think there is no way of input my SSH Key pair in Coda. Is there a way of connecting Coda to my EC2 instance?

推荐答案

科达应该拿起设置从您的ssh配置,所以你可以很容易进行配置。

Coda should pick up settings from your ssh config so you can configure this fairly easily.

如果您保存您的EC2 SSH密钥对在〜/ .ssh / ec2_rsa然后只需编辑的〜/ .ssh / config来是这样的:

If you've saved your EC2 ssh keypair in ~/.ssh/ec2_rsa then simply edit ~/.ssh/config to look like:

IdentityFile ~/.ssh/ec2_rsa

您也可以限制IdentityFile指令只是你的AWS资源有:

You can also restrict the IdentityFile directive to just your AWS resource with:

Host somehost.amazonaws.com
    IdentityFile ~/.ssh/ec2_rsa

如果一切都配置正确,那么你应该可以,在命令行中运行 SSH用户名@ awshost ,并得到一个登录提示

If everything's configured properly then you should be able to, from the command line, run ssh username@awshost and get a login prompt

如果您继续编辑的/ etc / SSH / sshd_config中并添加行 Password验证有问题可以随时启用密码验证您的实例是到文件的末尾,然后设置您的用户密码与 passwd文件

If you continue to have problems you can always enable password authentication on your instance by editing /etc/ssh/sshd_config and adding the line PasswordAuthentication yes to the end of the file, then setting a password for your user with passwd

我用下面的设置,我的.ssh / config来自动应用我的EC2密钥对的EC2资源:

I use the following settings in my .ssh/config to automatically apply my EC2 keypairs for EC2 resources:

# EC2 Northern Virginia
Host *.compute-1.amazonaws.com
    IdentityFile ~/.keys/ssh/ec2/us_east_1.key
    StrictHostKeyChecking no
    UserKnownHostsFile /dev/null
    IdentitiesOnly yes
    ForwardAgent no

# EC2 Northern California:
Host *.us-west-1.compute.amazonaws.com
    IdentityFile ~/.keys/ssh/ec2/us_west_1.key
    StrictHostKeyChecking no
    UserKnownHostsFile /dev/null
    IdentitiesOnly yes
    ForwardAgent no

# EC2 Ireland:
Host *.eu-west-1.compute.amazonaws.com
    IdentityFile ~/.keys/ssh/ec2/eu_west_1.key
    StrictHostKeyChecking no
    UserKnownHostsFile /dev/null
    IdentitiesOnly yes
    ForwardAgent no

# EC2 Singapore:
Host *.ap-southeast-1.compute.amazonaws.com
    IdentityFile ~/.keys/ssh/ec2/ap_southeast_1.key
    StrictHostKeyChecking no
    UserKnownHostsFile /dev/null
    IdentitiesOnly yes
    ForwardAgent no

# EC2 Tokyo:
Host *.ap-northeast-1.compute.amazonaws.com
    IdentityFile ~/.keys/ssh/ec2/ap_northeast_1.key
    StrictHostKeyChecking no
    UserKnownHostsFile /dev/null
    IdentitiesOnly yes
    ForwardAgent no

这篇关于如何配置科达工作,为我的Amazon EC2实例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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