When trying to authenticate with ssh-agent keys, I get an authentication error. It is a non-specific error and I believe it to be a mismatch between dev username and target username:
~ whoami
dennis
~ ssh-add -l
2048 20:5c:dd:a9:0f:df:aa:45:d1:93:a0:bc:1b:43:ac:df /Users/dennis/.ssh/id_rsa (RSA)
~ grow deploy web1 mojado.com
Deploying to: mojado.com:/home/dmojado/www/
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
Connected (version 2.0, client OpenSSH_6.0p1)
Authentication (publickey) failed.
Traceback (most recent call last):
File "<string>", line 27, in <module>
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/google.apputils.appcommands", line 796, in Run
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/google.apputils.app", line 238, in run
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/google.apputils.app", line 267, in _actual_start
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/google.apputils.appcommands", line 793, in InterceptReallyStart
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/google.apputils.app", line 220, in really_start
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/google.apputils.appcommands", line 778, in _CommandsStart
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/google.apputils.appcommands", line 284, in CommandRun
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/grow.commands", line 96, in Run
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/grow.deployments.base", line 130, in deploy
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/grow.deployments.scp", line 24, in prelaunch
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/paramiko.client", line 273, in connect
File "/Users/jeremydw/git/macgrow/pygrow/build/grow/out00-PYZ.pyz/paramiko.client", line 456, in _auth
paramiko.ssh_exception.AuthenticationException: Authentication failed.
python
Python 2.7.5 (default, Mar 9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import paramiko, os
>>> paramiko.common.logging.basicConfig(level=paramiko.common.DEBUG)
>>> ssh = paramiko.SSHClient()
>>> ssh.load_system_host_keys()
>>> ssh.connect("www.mojado.com", port=22)
DEBUG:paramiko.transport:starting thread (client mode): 0xa592610L
INFO:paramiko.transport:Connected (version 2.0, client OpenSSH_6.0p1)
DEBUG:paramiko.transport:kex algos:['ecdh-sha2-nistp256', 'ecdh-sha2-nistp384', 'ecdh-sha2-nistp521', 'diffie-hellman-group-exchange-sha256', 'diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss', 'ecdsa-sha2-nistp256'] client encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', '[email protected]'] server encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', '[email protected]'] client mac:['hmac-md5', 'hmac-sha1', '[email protected]', 'hmac-sha2-256', 'hmac-sha2-256-96', 'hmac-sha2-512', 'hmac-sha2-512-96', 'hmac-ripemd160', '[email protected]', 'hmac-sha1-96', 'hmac-md5-96'] server mac:['hmac-md5', 'hmac-sha1', '[email protected]', 'hmac-sha2-256', 'hmac-sha2-256-96', 'hmac-sha2-512', 'hmac-sha2-512-96', 'hmac-ripemd160', '[email protected]', 'hmac-sha1-96', 'hmac-md5-96'] client compress:['none', '[email protected]'] server compress:['none', '[email protected]'] client lang:[''] server lang:[''] kex follows?False
DEBUG:paramiko.transport:Ciphers agreed: local=aes128-ctr, remote=aes128-ctr
DEBUG:paramiko.transport:using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-ctr, remote aes128-ctr; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none
DEBUG:paramiko.transport:Switch to new keys ...
DEBUG:paramiko.transport:Trying SSH agent key 205cdda90fdfaa45da9fa0bd1843acdf
DEBUG:paramiko.transport:userauth is OK
INFO:paramiko.transport:Authentication (publickey) failed.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.macosx-10.8-intel/egg/paramiko/client.py", line 337, in connect
File "build/bdist.macosx-10.8-intel/egg/paramiko/client.py", line 528, in _auth
paramiko.AuthenticationException: Authentication failed.
>>> DEBUG:paramiko.transport:EOF in transport thread
When I have ssh key in ssh-agent and test with parameter "username", e.g.
>>> ssh.connect("www.mojado.com", username="dmojado" port=22)
the connection seems to work.
I propose we add an optional username parameter to destination: scp in podspec.yaml to allow for discrepancies between dev username and production server login.