我已按照线程中的说明进行操作:How do configure Coda to work for my Amazon EC2 instance?
但是,我仍然遇到问题。我只需输入 ssh unbuntu@ip
就可以通过 ssh 进入我的 EC2 实例以及在 Coda 中使用终端。当我尝试添加站点并连接时 - 它说服务器不接受用户名或密码。
我确信我对位于 .ssh 中的 key 对的权限是正确的(400),因为我可以通过 ssh 进入它。
我的尾声设置是:
Protocal: SFTP port 22
Server: <ip>
username: ubuntu
password: <blank>
Root URL: http://<ip>/sub
此外,
我的 .ssh 目录权限为 700,其中的所有文件都设置为 400。
我的配置文件看起来像:
Host <ip>
User ubuntu
IdentityFile ~/.ssh/key.pem
HostName <ip>
知道出了什么问题吗?我可以通过终端 ssh 并使用 Coda 终端;然而,我说
"Could not connect to server xxxx: The username or password was not accepted by the server."`
当我尝试使用 Coda 打开网站时。
最佳答案
在使用 Coda 创建新站点以用于 EC2 实例时,我使用过:
Protocol: SFTP
Port: 22
Server:ec2-xxx-xxx-xxx-xxx.eu-west-1.compute.amazonaws.com
User Name: ec2-user
Password: (Press the Key Icon and select your Key Pair)
Root URL: http://whatever.com
Remote Root: /var/www/html/whatever.com
Local Root: /Volumes/Macintosh HD/Users/Alex/Location/Location/Location
按保存就完成了。
您还可以创建一个
~/.ssh/config
文件:# AWS Ec2 Ireland
Host *.eu-west-1.compute.amazonaws.com
IdentityFile /location/of/your/pem/file/dublin.pem
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
IdentitiesOnly yes
ForwardAgent no
关于ssh - 您如何将 Coda 连接到 AWS EC2 实例?无效的用户名或密码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12011270/