Questions tagged [libssh]

libssh is a mulitplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side.

libssh is a C library that enables you to write a program that uses the SSH protocol. With it, you can remotely execute programs, transfer files, or use a secure and transparent tunnel for your remote programs. The SSH protocol is encrypted, ensures data integrity, and provides strong means of authenticating both the server and the client. The library hides a lot of technical details from the SSH protocol, but this does not mean that you should not try to know about and understand these details.

libssh is a Free Software / Open Source project. The libssh library is distributed under LGPL license. The libssh project has nothing to do with "libssh2", which is a completely different and independent project.

libssh can run on top of either libgcrypt or libcrypto, two general-purpose cryptographic libraries.

218 questions
0
votes
2 answers

ssh_scp_read returns garbage

I'm trying to download a file from my server; both the client and the server are Linux, yet ssh_scp_read() returns an incorrect integer. According to the documentation the function writes up to 65536 bytes, yet is only reading 16384 when the file…
Vanreyn
  • 21
  • 4
0
votes
0 answers

execute command on remote windows machine using libssh

I tried executing a shell command on a remote linux host using libssh and it worked. I followed the example from their tutorial . But when tried on a windows remote host, it didn't work (I changed the command of course). So my question is: is it…
svink
  • 101
  • 1
  • 9
0
votes
1 answer

Can't open remote file: SCP status code 1d not valid libssh 0.7.3

Disclaimer: Google-fu'ing my way through this... I was wondering if anyone would be able to take a look at this & point me in the right direction & thank you for anyone able to solve...I'm fresh out of idea's again... The file size function…
Snow
  • 41
  • 8
0
votes
1 answer

Compilation of libssh2 for the iPhone fails

Currently i'm trying to compile libssh2 to run on the iPhone. On my research i've found those instructions how to compile it. But when i try it i always get configure: error: C preprocessor…
Staeff
  • 4,994
  • 6
  • 34
  • 58
0
votes
1 answer

Importing libssh into Qt

I'm currently trying to import libssh into a Qt project I am working on. It appears that I have the library linked correctly as the project builds, but once I run the project it just crashes before anything really starts up. Which makes debugging…
Iseis
  • 11
  • 1
  • 6
0
votes
1 answer

SFTP libssh failure

I am using the libssh library and trying to create a new SFTP session. I keep getting an error message of ssh_packet_unimplemented: Received SSH_MSG_UNIMPLEMENTED (sequence number 3) I checked the syslog of the remote server and found the…
Amous
  • 534
  • 5
  • 18
0
votes
1 answer

stderr with libssh in pty mode

I'm using libssh to execute commands on a remote server. Here is my code (return codes are not checked here for simplification, but all of them are OK): #include #include #include int main() { /* opening…
julienc
  • 19,087
  • 17
  • 82
  • 82
0
votes
1 answer

SFTP nodejs server access error

I am implementing SFTP Nodejs server script based on libssh (npm install ssh) var config = require('config'); var fs = require('fs'); var path = require('path'); var libssh = require('ssh'); var server; var options = { host: 'localhost', …
Yegor Dia
  • 61
  • 1
  • 8
0
votes
2 answers

Core dump when trying libssh authentication

I'm following the tutorial to try to open and authenticate a SSH connection with libssh but after ssh_connect, whether I try password auth, public key auth or even none auth, the application crashes with a core dump. t@1 (l@1) program…
Marc
  • 856
  • 1
  • 8
  • 20
0
votes
1 answer

copying binary files to remote location in C++

I'm in the process of trying to copy an hdf5 binary file on a local machine to a remote computing blade. I am using libssh to copy the desired directory or files out after they are generated by my Qt application. Using libssh I am able to open an…
Wired365
  • 199
  • 1
  • 13
0
votes
1 answer

How to read line of output with libssh

In ssh cli, I can: ssh root@localhost -t aria2c https://github.com/JetBrains/intellij-community/archive/master.zip it will show progress right now like: ssh root@localhost -t aria2c…
anzeaucha
  • 157
  • 6
0
votes
1 answer

libssh crypt_set_algorithms2 error

Hi everyone I am trying to establish a simple ssh connection between a windows app (a program I wrote) and a ssh server. In my code I use libssh and I have an error like that: crypt_set_algorithms2: no crypto algorithm function found for…
mac johnsto
  • 123
  • 1
  • 1
  • 8
0
votes
0 answers

libssh: ssh_userauth_none always returning SSH_AUTH_ERROR

In my ssh client I am using ssh_userauth_none before calling ssh_userauth_list(). But it always returns SSH_AUTH_ERROR. When I try to find out the reason for error using ssh_get_error() it says Socket error: disconnected. I have used the same code…
Banu Prakash
  • 111
  • 9
0
votes
0 answers

Running two socket applications within one program

I have two C/C++ socket programs, say server and client, and both communicate to each other through read and write. The entire flow works fine (i.e., communication, read, write) when I run the two programs on two separate terminals in localhost. To…
Jes
  • 2,614
  • 4
  • 25
  • 45
0
votes
0 answers

Distributed program with libssh

I am designing a distributed program using C/C++ based socket communication. Basically, I have one server program S and three client programs A, B, and C, and client programs communicate with the server program S through customized socket port.…
Jes
  • 2,614
  • 4
  • 25
  • 45