Giter VIP home page Giter VIP logo

Comments (10)

soreana avatar soreana commented on August 28, 2024 1

I have the same problem. It was my mistake. I forget to put a "\n" at the end of each line, in my key string.

from jcabi-ssh.

dmarkov avatar dmarkov commented on August 28, 2024

@yegor256 please do something about this issue

from jcabi-ssh.

yegor256 avatar yegor256 commented on August 28, 2024

@lordofthejars looks correct to me. what exactly do you see? can you post stacktrace here?

from jcabi-ssh.

lordofthejars avatar lordofthejars commented on August 28, 2024

Sorry for being a bit late, JavaOne thing hehehe:

java.io.IOException: com.jcraft.jsch.JSchException: invalid privatekey: [B@24a1c17f
    at com.jcabi.ssh.SSH.session(SSH.java:279)
    at com.jcabi.ssh.SSH.exec(SSH.java:219)
    at com.jcabi.ssh.Shell$Plain.exec(Shell.java:172)
Caused by: com.jcraft.jsch.JSchException: invalid privatekey: [B@24a1c17f
    at com.jcraft.jsch.KeyPair.load(KeyPair.java:902)
    at com.jcraft.jsch.KeyPair.load(KeyPair.java:543)
    at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:40)
    at com.jcraft.jsch.JSch.addIdentity(JSch.java:393)
    at com.jcraft.jsch.JSch.addIdentity(JSch.java:353)
    at com.jcabi.ssh.SSH.session(SSH.java:261)

from jcabi-ssh.

lordofthejars avatar lordofthejars commented on August 28, 2024

Any idea? Maybe I need to install something?

from jcabi-ssh.

MathieuGingras avatar MathieuGingras commented on August 28, 2024

Any news on this ? I got the same error but I know the key is valid, since I use it almost everyday

from jcabi-ssh.

lordofthejars avatar lordofthejars commented on August 28, 2024

No answer, I tried everything but didn't work and I decided to give up.

from jcabi-ssh.

MathieuGingras avatar MathieuGingras commented on August 28, 2024

Disappointed to hear this but thanks for the info !

from jcabi-ssh.

MathieuGingras avatar MathieuGingras commented on August 28, 2024

If it may interest others, I was able to fix my problem. It turns out that my private key need a passphrase. By switching to 2.0-snapshot, and using the new constructor (#50) I was able to make it work.

from jcabi-ssh.

mgemmell avatar mgemmell commented on August 28, 2024

I have the same problem. It was my mistake. I forget to put a "\n" at the end of each line, in my key string.

Same with me, I had to edit my private key file (.ppk) to replace the \r with an \n, at the end of each line. I did this easily in Notepad++ with Find/Replace, Extended search mode, find "\r" and replace with "\n".

from jcabi-ssh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.