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

Error: OpenSSH keys only supported if ED25519 is available #586

Closed
paulmist opened this issue Apr 3, 2020 · 8 comments
Closed

Error: OpenSSH keys only supported if ED25519 is available #586

paulmist opened this issue Apr 3, 2020 · 8 comments
Labels

Comments

@paulmist
Copy link

paulmist commented Apr 3, 2020

OS: macOs Catalina 10.15.4
Ruby: 2.6.3p62
Wordmove: 5.0.2
Using RVM

I've got a new install on a new mac - hitting the following problem when trying to push a database.

OpenSSH keys only supported if ED25519 is available (NotImplementedError)
net-ssh requires the following gems for ed25519 support:
 * rbnacl (>= 3.2, < 5.0)
 * rbnacl-libsodium, if your system doesn't have libsodium installed.
 * bcrypt_pbkdf (>= 1.0, < 2.0)
See https://github.com/net-ssh/net-ssh/issues/478 for more information
Gem::MissingSpecVersionError : "Could not find 'rbnacl' (>= 3.2.0, < 5.0) - did find: [rbnacl-5.0.0]
Checked in 'GEM_PATH=/Users/paulmist/.rvm/gems/ruby-2.6.3:/Users/paulmist/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0', execute `gem env` for more information"

Have tried installing the mentioned gems rbnacl (5.0), rbnacl-libsodium, bcrypt_pbkdf.

No change.

@alessandro-fazzi
Copy link
Member

Hi already tried to read this related issue #510 ?

@alessandro-fazzi
Copy link
Member

BTW I think that it's a https://github.com/welaika/photocopier 's fault.

I'd be ok to try to update its dependencies, just want to be sure that you already followed past troubleshooting paths. :)

Let me know

@paulmist
Copy link
Author

paulmist commented Apr 6, 2020

As per #510 (comment) the issue appeared to be related to macOs no longer keeping my SSH key persistent after a reboot.

Fixed using https://apple.stackexchange.com/questions/48502/how-can-i-permanently-add-my-ssh-private-key-to-keychain-so-it-is-automatically

@paulmist paulmist closed this as completed Apr 6, 2020
@alessandro-fazzi
Copy link
Member

Thanks a lot for sharing your solution :)

@gormv
Copy link

gormv commented Apr 8, 2020

@pioneerskies Tried wordmove and I'm also hitting this and not on mac. Tried the fix metioned by @paulmist but I still get this error when trying to do a pull against a google cloud instance (the mysqldump step is failing) so I think it might be an issue with photocopier as you mentioned.

rsync steps seems to run fine.

Traceback (most recent call last):
	32: from /usr/local/bundle/bin/wordmove:23:in `<main>'
	31: from /usr/local/bundle/bin/wordmove:23:in `load'
	30: from /usr/local/bundle/gems/wordmove-5.0.2/exe/wordmove:6:in `<top (required)>'
	29: from /usr/local/bundle/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
	28: from /usr/local/bundle/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
	27: from /usr/local/bundle/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
	26: from /usr/local/bundle/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
	25: from /usr/local/bundle/gems/wordmove-5.0.2/lib/wordmove/cli.rb:91:in `pull'
	24: from /usr/local/bundle/gems/wordmove-5.0.2/lib/wordmove/cli.rb:39:in `handle_options'
	23: from /usr/local/bundle/gems/wordmove-5.0.2/lib/wordmove/cli.rb:39:in `each'
	22: from /usr/local/bundle/gems/wordmove-5.0.2/lib/wordmove/cli.rb:40:in `block in handle_options'
	21: from /usr/local/bundle/gems/wordmove-5.0.2/lib/wordmove/cli.rb:92:in `block in pull'
	20: from /usr/local/bundle/gems/wordmove-5.0.2/lib/wordmove/deployer/ssh.rb:48:in `pull_db'
	19: from /usr/local/bundle/gems/wordmove-5.0.2/lib/wordmove/deployer/ssh/default_sql_adapter.rb:28:in `adapt_remote_db!'
	18: from /usr/local/bundle/gems/wordmove-5.0.2/lib/wordmove/deployer/ssh.rb:79:in `download_remote_db'
	17: from /usr/local/bundle/gems/wordmove-5.0.2/lib/wordmove/deployer/ssh.rb:66:in `remote_run'
	16: from /usr/local/bundle/gems/photocopier-1.3.2/lib/photocopier/ssh.rb:42:in `exec!'
	15: from /usr/local/bundle/gems/photocopier-1.3.2/lib/photocopier/ssh.rb:69:in `session'
	14: from /usr/local/bundle/gems/net-ssh-4.2.0/lib/net/ssh.rb:241:in `start'
	13: from /usr/local/bundle/gems/net-ssh-4.2.0/lib/net/ssh/authentication/session.rb:66:in `authenticate'
	12: from /usr/local/bundle/gems/net-ssh-4.2.0/lib/net/ssh/authentication/session.rb:66:in `each'
	11: from /usr/local/bundle/gems/net-ssh-4.2.0/lib/net/ssh/authentication/session.rb:80:in `block in authenticate'
	10: from /usr/local/bundle/gems/net-ssh-4.2.0/lib/net/ssh/authentication/methods/publickey.rb:19:in `authenticate'
	 9: from /usr/local/bundle/gems/net-ssh-4.2.0/lib/net/ssh/authentication/key_manager.rb:119:in `each_identity'
	 8: from /usr/local/bundle/gems/net-ssh-4.2.0/lib/net/ssh/authentication/key_manager.rb:119:in `each'
	 7: from /usr/local/bundle/gems/net-ssh-4.2.0/lib/net/ssh/authentication/key_manager.rb:122:in `block in each_identity'
	 6: from /usr/local/bundle/gems/net-ssh-4.2.0/lib/net/ssh/authentication/methods/publickey.rb:20:in `block in authenticate'
	 5: from /usr/local/bundle/gems/net-ssh-4.2.0/lib/net/ssh/authentication/methods/publickey.rb:62:in `authenticate_with'
	 4: from /usr/local/bundle/gems/net-ssh-4.2.0/lib/net/ssh/authentication/key_manager.rb:142:in `sign'
	 3: from /usr/local/bundle/gems/net-ssh-4.2.0/lib/net/ssh/key_factory.rb:43:in `load_private_key'
	 2: from /usr/local/bundle/gems/net-ssh-4.2.0/lib/net/ssh/key_factory.rb:52:in `load_data_private_key'
	 1: from /usr/local/bundle/gems/net-ssh-4.2.0/lib/net/ssh/key_factory.rb:112:in `classify_key'
/usr/local/bundle/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519_loader.rb:19:in `raiseUnlessLoaded': OpenSSH keys only supported if ED25519 is available (NotImplementedError)

@gormv
Copy link

gormv commented Apr 8, 2020

Ok, got it working. I used the docker image welaika/wordmove

To get it working against an ssh host with ed25519 key, I had to add launch the ssh-agent: eval `ssh-agent -s and add ~/.ssh/config with:

Host *
  AddKeysToAgent yes

@alessandro-fazzi
Copy link
Member

@gormv if you modified the image in order to eval ssh-agent -s, you may be interested in discuss about that into the image's github repo.

Thanks for sharing

@laithsinawi
Copy link

Ok, got it working. I used the docker image welaika/wordmove

To get it working against an ssh host with ed25519 key, I had to add launch the ssh-agent: eval `ssh-agent -s and add ~/.ssh/config with:

Host *
  AddKeysToAgent yes

This worked for me. Thanks!

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

No branches or pull requests

4 participants