Giter Site home page Giter Site logo

DLL locations? about rb-libssh2 HOT 6 CLOSED

charonn0 avatar charonn0 commented on July 23, 2024
DLL locations?

from rb-libssh2.

Comments (6)

charonn0 avatar charonn0 commented on July 23, 2024

The DLLs should be in the same folder as the EXE file.

from rb-libssh2.

rabeyer avatar rabeyer commented on July 23, 2024

Thanks, that's what I thought...that isn't working for some reason...I'm getting the PlatformNotSupportedException error using part of your sample code for command execution:

Dim sh As SSH.Channel = SSH.OpenChannel("ssh://"+user+":"+password+"@"+IPAddress)
sh.DataMode = SSH.ExtendedDataMode.Merge ' redirect stderr to stdout
'Call sh.Execute("echo "+password+" | sudo -S shutdown -h now")
Call sh.Execute("echo "+password+" | sudo -S ps -al")
Dim result As String
Do Until sh.EOF
Call sh.Poll()
If sh.BytesReadable > 0 Then
result = result + sh.Read(sh.BytesReadable, 0) ' 0 indicates StdOut/In
End If
Loop
sh.Close

from rb-libssh2.

charonn0 avatar charonn0 commented on July 23, 2024

Are you trying to use 32-bit DLLs with a 64-bit app (or vice versa)?

from rb-libssh2.

rabeyer avatar rabeyer commented on July 23, 2024

I confirmed that I have 64-bit compiled app and 64-bit versions of the libraries:
libssh2-1.10.0_5-win64-mingw
__64-libcrypto-1_1-x64.dll1.1.1.0

from rb-libssh2.

charonn0 avatar charonn0 commented on July 23, 2024

It looks like libssh2 got an update recently (1.10.0) and now links against a newer version of libcrypto. Try replacing libcrypto-1_1-x64.dll with libcrypto-3-x64.dll (available here: https://curl.se/windows/dl-7.78.0_5/openssl-3.0.0_5-win64-mingw.zip)

from rb-libssh2.

rabeyer avatar rabeyer commented on July 23, 2024

That solved it. Thanks so much!

from rb-libssh2.

Related Issues (3)

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.