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
2
votes
1 answer

C: can I forward port for external application with libssh?

I'm implementing VNC connection for xen VM in my app. In order to connect I have to forward the port as XenServer accept only local connection. I do it like this: ssh -L 5903:localhost:5903 root@192.168.1.4 After it a can connect my VNC to…
pugnator
  • 665
  • 10
  • 27
2
votes
1 answer

C++ Libssh -sever/client file transfer over the lan example

Newbie here basically I'm trying to build a sever/client file transfer application that transfers files and folders over the lan. Does any one have any sample application that I can look into that uses C++? Libssh examples are all in C which I…
user2557850
  • 119
  • 1
  • 3
  • 14
2
votes
1 answer

Using libssh library, I have a trouble with ssh_scp_read function

Now I'm trying to download file from server (Linux) to my host (windows). It looks working well (other functions) but when I'm trying to read file from server. Data in the file is not proper. for example) server text file: A B C D E Reading file…
Jongju Kim
  • 184
  • 2
  • 13
2
votes
2 answers

How to run makefile with libssh?

I have a problem with libssh (libssh.org). I need to run a makefile on the remote server. I do it with a command "channel_request_exec": int SSHExecCmd (void(* MessSender)(char* CurMessage, bool IsError, CWnd* MainWnd),ssh_session session, CString…
snk
  • 175
  • 3
  • 10
1
vote
2 answers

ssh2.so unable to load on CentOS 5

I've been trying to install the SSH2 libraries for php onto a web server running CentOS 5 with PHP 5.1.6 and was able to successfully install all the dependencies, but after restarting the web server I get the following error: PHP Warning: PHP…
1
vote
0 answers

SSH channel polling only when 4096 bytes ready

Write a program which processed data output from ssh request, data from request returns in real time ~1024 bytes per second and i want to process it in real time (drawing a graphics). But ssh_channel_poll function return non zero only when 4096…
1
vote
1 answer

libssh: Public key authentication failed: The key algorithm 'ssh-rsa' is not allowed to be used by PUBLICKEY_ACCEPTED_TYPES configuration option

I'm using libssh to connect to a remote host running debian 8.11 and OpenSSH_6.7p1. The host has my RSA public key. I can connect to the remote host via the command line. However, using libssh to connect to the virtual machine it fails giving the…
1
vote
1 answer

Compiling C++ code using libssh library through vcpkg

I installed libssh through vcpkg on my Windows 8.1 machine. vcpkg install libssh Now I am trying to compile my c++ code making use of libssh. #include #include int main() { ssh_session my_ssh_session = ssh_new(); …
1
vote
0 answers

Installing libssh on windows using vcpkg

I'm trying to install libssh on windows using vcpkg like they recommend libssh download guid. but when I run vcpkg install libssh it starts downloading stuff and configures cmake but when it tries to build pthreads it fails and I receive the…
Omer Dagry
  • 537
  • 4
  • 9
1
vote
1 answer

problem of using ssh_connect API in windows

I have tested a simple code using libssh on OS X and it worked simply find. But when I port this code on Windows7 using vc10 it doesn't work correctly. The ssh_connect API blocks and not progress any more. The following code is part of the my test…
yielding
  • 77
  • 1
  • 7
1
vote
1 answer

Build libssh with vcpkg enable gssapi

I'm trying to build libssh with vcpkg for windows x86 but i need to enable gssapi support. With standard command vcpkg install libssh i'm getting an dynamic library but the log files shows that gssapi support isnt build in. [1/2] cmd /c "cd…
Marco
  • 129
  • 1
  • 9
1
vote
0 answers

libssh timeout when connecting

I use libssh to connect to a server using the following code: sshSession { ssh_new() } ssh_options_set(sshSession, SSH_OPTIONS_HOST, "192.168.1.190"); ssh_options_set(sshSession, SSH_OPTIONS_PORT_STR, "22"); …
Thomas Flinkow
  • 4,845
  • 5
  • 29
  • 65
1
vote
1 answer

File download with libssh SFTP is corrupt

I'm using libssh to download a file from a Debian Linux server on my local Windows machine, the program is running without error but the downloaded file is corrupted. When I download via pscp it works, I don't know if I'm doing something wrong with…
1
vote
1 answer

How to download folder or file from server using SFTP with libssh in C++?

Is there anyway to download file or folder from server using SFTP? (C++, libssh) I try to follow example here: https://github.com/substack/libssh/blob/master/examples/samplesftp.c But I cannot download file/folder... Here is my code: int…
djowlrid
  • 71
  • 1
  • 5
1
vote
1 answer

libssh's sftp_new: Out of memory

I want to connect and asynchronously read a file from a SFTP server using libssh 0.9.5. But this simple working example: //https://api.libssh.org/master/libssh_tutor_sftp.html#sftp_read #include #include #include…