From cfcce3865437ff0e1ad6a1d0ea990755aa5f3884 Mon Sep 17 00:00:00 2001 From: cocoy Date: Wed, 19 May 2010 13:46:51 +0800 Subject: [PATCH] change back to server_user and added some items on README --- mr/awsome/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mr/awsome/__init__.py b/mr/awsome/__init__.py index c8d431d..345f2b4 100644 --- a/mr/awsome/__init__.py +++ b/mr/awsome/__init__.py @@ -254,7 +254,10 @@ def init_ssh_key(self, user=None): log.error("Can't establish ssh connection.") return if user is None: - user = 'root' + # check user at config file + user = self.config['server_user'] + if user is None: + user = 'root' host = str(instance.public_dns_name) port = 22 client = paramiko.SSHClient() @@ -690,4 +693,4 @@ def aws_ssh(configpath=None): argv = sys.argv[:] argv.insert(1, "ssh") aws = AWS(configfile=configpath) - return aws(argv) \ No newline at end of file + return aws(argv)