Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSHException: not a valid EC private key file #207

Open
RiceBowlJr opened this issue Feb 5, 2018 · 3 comments
Open

SSHException: not a valid EC private key file #207

RiceBowlJr opened this issue Feb 5, 2018 · 3 comments

Comments

@RiceBowlJr
Copy link

Hi,
I've got an error when trying to attack my target. The error below is showing, but can't find any workaround. Seems that Python SSH module (paramiko) you use don't like my key type. It is an Amazon keypair that I placed in my ~/.ssh directory. I tried to reate a new one but it doesn't change a thing.

bees attack -n 2000 -c 500 --url=<URL> --headers="Accept:*/*;Accept-Encoding:gzip,deflate;Connection:keep-alive;Content-Length:25;Content-Type:application/x-www-form-urlencoded;Host:<host>;Origin:<originurl>;Referer:<Referer>" --post-file=data.json
 
Read 4 bees from the roster: eu-west-1a
Connecting to the hive.
Assembling bees.
Each of 4 bees will fire 500 rounds, 125 at a time.
Stinging URL sequentially so it will be cached for the attack.
Organizing the swarm.
Bee 0 is joining the swarm.
Bee 1 is joining the swarm.
Bee 2 is joining the swarm.
Bee 3 is joining the swarm.
/usr/lib/python2.7/dist-packages/Crypto/Cipher/blockalgo.py:141: FutureWarning: CTR mode needs counter parameter, not IV
  self._cipher = factory.new(key, *args, **kwargs)
/usr/lib/python2.7/dist-packages/Crypto/Cipher/blockalgo.py:141: FutureWarning: CTR mode needs counter parameter, not IV
  self._cipher = factory.new(key, *args, **kwargs)
/usr/lib/python2.7/dist-packages/Crypto/Cipher/blockalgo.py:141: FutureWarning: CTR mode needs counter parameter, not IV
  self._cipher = factory.new(key, *args, **kwargs)
/usr/lib/python2.7/dist-packages/Crypto/Cipher/blockalgo.py:141: FutureWarning: CTR mode needs counter parameter, not IV
  self._cipher = factory.new(key, *args, **kwargs)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/beeswithmachineguns/bees.py", line 421, in _attack
    key_filename=pem_path)
  File "/usr/local/lib/python2.7/dist-packages/paramiko/client.py", line 307, in connect
    look_for_keys, gss_auth, gss_kex, gss_deleg_creds, gss_host)
  File "/usr/local/lib/python2.7/dist-packages/paramiko/client.py", line 519, in _auth
    raise saved_exception
SSHException: not a valid EC private key file

Kind of annoying since I can do most of my loadcharge tests with AB Testing, but not all of them.
Free to give more infos about my issue.

@mkarski
Copy link

mkarski commented Apr 26, 2018

Same problem. Any solution so far, @RiceBowlJr ?

@edison0xyz
Copy link

Adding -l ubuntu worked for me.

Although it has been three years, paramiko is still strict about the user who is supposed to "own" the private key.

@RiceBowlJr
Copy link
Author

Hi @mkarski
Since my load tests were pretty basic, I switched to an home made solution based on multiple instances and Ansible ad-hoc cURL commands.

Although I will try to reproduce it and find a workaround, but since I changed my comuter I may not be abel to reproduce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants