fun_sftp icon indicating copy to clipboard operation
fun_sftp copied to clipboard

SFTP with private key - don't know how to write

Open kcollignon opened this issue 1 year ago • 0 comments

Hello @georgediaz88

I am having an issue when transmitting files with SFTP w/ key authentication, I get this random error which I can't seem to debug. Have you ever encountered this error or know what it might relate to?

Ruby 2.6.5 on gem version 1.1.3

Error:

conn.upload!("path/to/myfile.txt", "myfile.text")

don't know how to write {:non_interactive=>true, :keys_only=>true, :key_data=>[], :keys=>["~/.ssh/authorized_keys/id_rsa"], :host_key=>"ssh-rsa", :timeout=>30}

Here is what my connection string looks like:

conn = SFTPClient.new(
          'sftp.redacted.com',
          'username',
          non_interactive: true,
          keys_only: true,
          key_data: [],
          keys: ["~/.ssh/authorized_keys/id_rsa"],
          host_key: 'ssh-rsa',
          timeout: 30
        )

kcollignon avatar Jul 23 '24 13:07 kcollignon