ployground / ploy

A tool to manage servers through a central configuration. Plugins allow provisioning, configuration and other management tasks.
http://ploy.readthedocs.org
BSD 3-Clause "New" or "Revised" License
78 stars 15 forks source link

More ssh login issues #23

Closed slinkp closed 10 years ago

slinkp commented 12 years ago

Here's an excerpt of my aws.conf:

[aws]

These files must exist and contain your EC2 API keys

access-key-id=~/.aws/access-key-id secret-access-key=~/.aws/secret-access-key region = us-east-1

[securitygroup:openblock-testing] description = OpenBlock Test Servers connections = tcp 22 22 0.0.0.0/0 tcp 80 80 0.0.0.0/0 tcp 8000 8000 0.0.0.0/0

[ macro:openblock-base] keypair = openblock securitygroups = openblock-testing region = us-east-1 placement = us-east-1d instance_type = t1.micro server_user = ubuntu

[instance:lucid-64] <= macro:openblock-base

lucid = ubuntu 10.04

image = ami-63be790a

This works at least enough that I can create an instance from scratch:

$ aws -c aws.conf start lucid-64 INFO: Instance 'lucid-64' unavailable INFO: Creating instance 'lucid-64' INFO: Instance created, waiting until it's available ....

But if I try to use assh to connect, no luck: $ assh lucid-64 INFO: Instance 'lucid-64' unavailable ERROR: Can't establish ssh connection. Traceback (most recent call last): File "/home/pw/builds/openblock/builds/20110519/bin/assh", line 9, in load_entry_point('mr.awsome==0.9', 'console_scripts', 'assh')() File "/home/pw/builds/openblock/builds/20110519/lib/python2.6/site-packages/mr/awsome/init.py", line 814, in aws_ssh return aws(argv) File "/home/pw/builds/openblock/builds/20110519/lib/python2.6/site-packages/mr/awsome/init.py", line 802, in call args.func(sub_argv, args.func.doc) File "/home/pw/builds/openblock/builds/20110519/lib/python2.6/site-packages/mr/awsome/init.py", line 715, in cmd_ssh user, host, port, client, known_hosts = server.init_ssh_key() TypeError: 'NoneType' object is not iterable

If I use ssh and explicitly specify my pem file, I can get in, so the server is definitely running: $ assh lucid-64 INFO: Instance 'lucid-64' unavailable ERROR: Can't establish ssh connection. Traceback (most recent call last): File "/home/pw/builds/openblock/builds/20110519/bin/assh", line 9, in load_entry_point('mr.awsome==0.9', 'console_scripts', 'assh')() File "/home/pw/builds/openblock/builds/20110519/lib/python2.6/site-packages/mr/awsome/init.py", line 814, in aws_ssh return aws(argv) File "/home/pw/builds/openblock/builds/20110519/lib/python2.6/site-packages/mr/awsome/init.py", line 802, in call args.func(sub_argv, args.func.doc) File "/home/pw/builds/openblock/builds/20110519/lib/python2.6/site-packages/mr/awsome/init.py", line 715, in cmd_ssh user, host, port, client, known_hosts = server.init_ssh_key() TypeError: 'NoneType' object is not iterable

fschulze commented 12 years ago

As written in the README, instances are identified by the name of the security group. So each instance must have a unique security group at the moment.

Some time ago Amazon introduced attributes on instances which includes a name. My plan is to use that in the future instead. Unfortunately I don't have much time for mr.awsome atm unless someone sponsors me.