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

Fails to set client host_key to ssh-ed25519 #905

Open
frmsaul opened this issue Mar 30, 2023 · 1 comment
Open

Fails to set client host_key to ssh-ed25519 #905

frmsaul opened this issue Mar 30, 2023 · 1 comment

Comments

@frmsaul
Copy link

frmsaul commented Mar 30, 2023

Expected behavior

host_key is set.

Actual behavior

Getting the following error:

algorithms.rb:410:in `negotiate': could not settle on host_key algorithm (Net::SSH::Exception)
Server host_key preferences: ssh-ed25519-cert-v01@openssh.com,ssh-ed25519
Client host_key preferences: 

System configuration

ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin21]
net-ssh (7.1.0)

Example App

# Read the private key data from the file
private_key_data = File.read(private_key_path)

Net::SSH.start(hostname, username,
               key_data: private_key_data,
               host_key: ['ssh-ed25519']) do |ssh|
  # Execute a command on the remote server
  output = ssh.exec!("echo 'Hello, World!'")

  # Print the output of the command execution
  puts "Command output: #{output}"
end
@mfazekas
Copy link
Collaborator

mfazekas commented Apr 9, 2023

@frmsaul can you include relevant part from server config, and instructions on how to generate the keys. This is so we can reproduce the issue,

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

No branches or pull requests

2 participants