Questions tagged [libssh2]

A client-side library that implements the SSH2 protocol.

A client-side library that implements the SSH2 protocol.

More information here.

292 questions
5
votes
2 answers

ssh2_exec not executing simple command

ssh_exec() is refusing to execute a command in Windows. Here is my code:
user2140392
  • 59
  • 1
  • 5
5
votes
1 answer

Java Ganymed Trlead Orion ssh session timeout

I am using the SSH Ganymed library alias Trilead alias Orion. I am trying to understand the exact behaviour of the session as I would need to keep an ssh connection opened for a long time (maybe for ever) and to close it just when my jvm goes down…
5
votes
5 answers

php refusing to find ssh2_connect() function

Operating System used Windows 7 - V 6.1 Apache installed httpd-2.2.22-win32-x86-no_ssl.msi My httpd.conf AddType application/x-httpd-php .php LoadModule php5_module "X:/Program Files/PHP/php5apache2_2.dll" Version of php…
Flavio Moraesjr
  • 73
  • 1
  • 2
  • 5
4
votes
3 answers

Keys for Net::SSH2

I have a simple perl test script which uses Net::SSH2, and I'm having trouble getting it to work with public key authentication. Note: After reading a couple of replies, I realise that I should mention that I created the script to help narrow down a…
Mike
  • 21,301
  • 2
  • 42
  • 65
4
votes
2 answers

How to install ssh2 for php 7.3

When trying to install the extension ssh2 via pecl, I encounter the below error messages. I was using a docker container based on php:7.3.2-fpm Steps to reproduce: Install PHP 7.3.2 Install the packages libssh2-1-dev and libssh2-1 Try to install…
Marco
  • 550
  • 2
  • 6
  • 22
4
votes
2 answers

LIBSSH2 and dso_dlfcn.c: ... undefined reference to `dlopen'

I am trying to compile git2go using static libgit2, openssl, and libssh2. My end goal is to be able to compile a go binary that can be deployed without the need to install these libraries. I found a similar question on SO that I have used to create…
arynhard
  • 173
  • 9
4
votes
2 answers

Fatal error: Call to undefined function ssh2_connect() - Redhat OS

I installed required libraries for enabling ssh2 extension. I just followed this guide to install the php ssh2 extension. And it got enabled in my phpinfo page. But, still I'm not able to use ssh2_connection function within my php file. It says the…
Mr. Black
  • 11,692
  • 13
  • 60
  • 85
4
votes
5 answers

Get CPU usage via SSH

I want to retrieve the CPU utilization percentage via SSH and I have tried the command "top" but it will not let me. I am using CentOS 6. I tried this code $connection = ssh2_connect("IP", PORT); ssh2_auth_password($connection, "root",…
user3120926
  • 201
  • 1
  • 2
  • 9
4
votes
3 answers

libssh2_config.h not created when installing libssh2

The title more or less describes the problem I'm having on my Ubuntu box. I followed the following steps in installing libssh2, as given in the instructions: ./configure make make check (all 3 tests passed) sudo make install (I have to use sudo due…
ValtsBlukis
  • 458
  • 4
  • 11
3
votes
1 answer

How can I redirect program output using libssh2?

I'm using libssh2 for a C++ program in a Linux environment and so far I'm able to start a program on a remote machine using libssh2_channel_exec. However I'd like to redirect the program's output to the local machine (i.e. the output shall travel…
Emiliano
  • 22,232
  • 11
  • 45
  • 59
3
votes
2 answers

ssh2-python package. Valid parameters for userauth_publickey_fromfile method

Based on docstring this method accepting the following parameters: Docstring: Session.userauth_publickey_fromfile(self, username, privatekey, passphrase='', publickey=None) Authenticate with public key from file. But official project…
Shtefan
  • 742
  • 12
  • 14
3
votes
0 answers

libssh2 unable to exchange encryption keys

I'm trying to connect to a SFTP server with the following command: array("mac" => "hmac-sha2-256,hmac-sha2-512,umac-64@openssh.com"))); But I get the following error message: PHP…
3
votes
1 answer

libssh2 Agent forwarding not working

I am using libssh2 library to ssh connections in my mobile application. Here I want to use Agent Forwarding support. I have followed same procedure as they have provided in example here LibSSH2 Agent Forwarding. I am able to create agent…
Niks
  • 647
  • 5
  • 16
3
votes
0 answers

ssh2_connect(): Error startingup SSH connection(-8): Unable to exchange encryption keys

I'm doing some coding with libssh2 to connect to Huawei routers. On some routers works fine, on others just echo this error: "Warning: ssh2_connect(): Error startingup SSH connection(-8): Unable to exchange encryption keys in (...)". I used putty…
rikkman
  • 31
  • 3
3
votes
0 answers

Libssh2 compilation using with-libssl-prefix not working

I have downloaded and compiled the latest version of libssl, the result of which is located at /usr/local/ssl. I want to compile libssh2 using the files in this folder, and to do that I've set the switch "--with-libssl-prefix=/usr/local/ssl". After…
Lopson
  • 1,202
  • 1
  • 8
  • 20
1
2
3
19 20