knipknap/exscript — Issue #18: ssh DSA key not working
Author: micha81
Created: 2011-10-14 14:57:15+00:00
State: open

Hi,

I tried to execute a script over ssh with a DSA public key. Reading the error correct the script expects a RSA file.
Is there a way to use DSA key files?
I'm using the 2.1 tag of exscript.

Here is the error i get.

exscript -p ssh2 --ssh-key=ssh-key test hostname
Please enter your user name [root]:
Please enter your password:
Reading key from ssh-key
hostname error: not a valid RSA private key file
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/Exscript/CustomAction.py", line 112, in execute
self._call_function(conn)
File "/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/Exscript/HostAction.py", line 62, in _call_function
return self.function(conn)
File "/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/Exscript/util/decorator.py", line 91, in decorated
result = function(conn, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/Exscript/util/decorator.py", line 117, in decorated
conn.login(flush = flush)
File "/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/Exscript/Connection.py", line 183, in login
self.protocol.login(account, flush = flush)
File "/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/Exscript/protocols/Protocol.py", line 582, in login
self.authenticate(account, flush = False)
File "/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/Exscript/protocols/Protocol.py", line 605, in authenticate
self.protocol_authenticate(account)
File "/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/Exscript/protocols/Protocol.py", line 634, in protocol_authenticate
self._protocol_authenticate_by_key(user, key)
File "/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/Exscript/protocols/SSH2.py", line 260, in _protocol_authenticate_by_key
self._paramiko_auth_key(user, keys, key.get_password())
File "/usr/local/lib/python2.6/dist-packages/Exscript-DEVELOPMENT-py2.6.egg/Exscript/protocols/SSH2.py", line 192, in _paramiko_auth_key
raise saved_exception
SSHException: not a valid RSA private key file

Regards
mg