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
0 answers

Pyhon Parallel-Ssh Sending Commands In Loop In a Single Shell Does Not Work

I have been trying to send a single command in a loop for a single client in a single shell because different commands need to go before the loop to get into a terminal using Parallel-ssh. Code: pclient = ParallelSSHClient(['ipaddress'],…
0
votes
1 answer

ssh_connect: Library not initialized (LibSSH)

I have the following piece of code which I am trying to build statically, so I end up with a single executable. #define LIBSSH_STATIC 1 #include #include #include #include #include…
user3580480
  • 442
  • 7
  • 14
  • 45
0
votes
1 answer

Libssh - Can't connect to Windows host

I have some code that initiates a simple SSH client session using Libssh, but its failing at ssh_connect int main() { ssh_session my_ssh_session; int rc; int port = 22; const char* password; int verbosity = SSH_LOG_FUNCTIONS; // Open session and…
user3580480
  • 442
  • 7
  • 14
  • 45
0
votes
1 answer

Builing gdal from source gives linking error with openssl

I'm trying to build gdal==3.4.1 from source on Redhat UBI8.6 with conda in a python 3.8 environment and proj 8.2.1 using the following: ./configure --prefix=$CONDA_PREFIX --with-netcdf=$CONDA_PREFIX --with-proj=$CONDA_PREFIX --with-curl=no make -j…
Shejo284
  • 4,541
  • 6
  • 32
  • 44
0
votes
1 answer

How to scp(transfer) file by a libssh?

I am trying to transfer compiled executable file (compiled code c++, that prints 'Hello World!') to openssh linux server by using library libssh(I cant use terminal scp of openssh). I know, that libssh has a scp functions to transfer file from and…
Rainbow
  • 29
  • 6
0
votes
0 answers

Cmake libssh.so.4: version LIBSSH_4_8_1 not found

I've been trying to build libyang on Ubuntu 22.04, and I keep running into this issue when running cmake: cmake: usr/local/lib/libssh.so.4: version `LIBSSH_4_8_1' not found (required by /lib/x86_64-linux-gnu/libcurl.so.4) I couldn't find anything…
Anatintti
  • 1
  • 1
0
votes
0 answers

make can't ld correctly the libssh library with msys2 on Windows 10

I have filed an issue on libssh git. This is an link issue, I'm not sure if it is about libnetconf2 or libssh. Environment: msys2 + mingw64 OS: Win10 Installed packages: libssh-devel with pacman, version: 0.9.6 $ pkg-config --modversion…
xiaoai
  • 1,181
  • 2
  • 7
  • 5
0
votes
1 answer

Couldn't find LibSSH on msys2 even the libssh-devel has installed with pacman

I'm trying to compile the libnetconf2 with msys2 environment on Windows 10 OS. But I get a wired(I guess) issue about libssh. I have installed libssh libssh2 libssh-devel libssh2-devel and the pkg-config also find the location of libssh: $…
xiaoai
  • 1,181
  • 2
  • 7
  • 5
0
votes
0 answers

libssh slow for file operations download and upload

I followed the documentation here https://api.libssh.org/master/libssh_tutor_sftp.html to write a small program in c to download a remote file, the program is working but downloading a 120MB file takes 12-14 seconds to complete, compared to winscp,…
0
votes
0 answers

Ansible libssh connection for network modules using ssh_common_args for chained jumphosts

Have been researching a bit about libssh connection.. this libssh seems to have come up with setup as an alternative to the paramiko connection, basically interested in this as it multiple network modules which can be used with ssh and our…
Deepak
  • 47
  • 4
0
votes
0 answers

Impossible to install R package "ssh"

thank you for reading! I am using RStudio on a macOS 11.0.1 and have tried every way I know of to install the "ssh" package. I attempted to install the package using the following methods: in R: remotes::install_github('ropensci/ssh') in R:…
0
votes
1 answer

libssh (C++): Possible to redirect some output from some given `fd` to an `ssh_channel` on remote side?

Using the libssh library, one can communicate with a remote host by opening a channel: // Assume authentication for sshSession has been completed ssh_channel channel_to_remote =…
leewayleaf
  • 11
  • 1
  • 2
0
votes
3 answers

ssh client returning error "Couldn't apply options"

I am getting "Couldn't apply options" while connecting to a SSH server. When I checked the source code of the library I found the following code in the client.c which is returning the error. ret = ssh_options_apply(session); if (ret < 0) { …
Supratik
  • 163
  • 6
0
votes
0 answers

Segmentation fault while executing with

I'm trying to execute a program that establishes a SFTP connection, a really simple one, based on the documentation presented in https://api.libssh.org/master/libssh_tutor_sftp.html#sftp_subsystem. The .c file is next: #define LIBSSH_STATIC…
0
votes
0 answers

how to catch exception of ssh_options_set function

I have this function which can handle a connection to ssh. connectSession() { std::string _ErrMsg; MyException errMsg; int port = 22; try { if (my_ssh_session == NULL) { std::cout << "Error creating ssh…
fa7eme
  • 73
  • 10