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
1
vote
2 answers

ssh connection using php

On my VPN I have a remote server and a remote router (which is running RouterOS with an API and supports ssh connections). What I want is to write a php script and deploy it on the server so it will connect to the remote router using ip address and…
KostR
  • 101
  • 3
  • 11
1
vote
0 answers

Installing ssh2 with php 5.5

Im working on debian wheezy and trying to install SSH2 for php 5.5 (installed from the dotweb repo) I tried to do it with the pecl command and manually downloading it from http://pecl.php.net/package/ssh2 But in both ways, I get this error during…
ClemB
  • 87
  • 1
  • 11
1
vote
0 answers

libssh2: libssh2_channel_write() doesn't seem to write data on the channel

I am trying to execute a command on a router via ssh. After the login, when I execute the command on the device, it asks for an additional password. I am not able to send the password using libssh2_channel_write(). Here is the code snippet (modified…
1
vote
0 answers

libssh2: How to send data through libssh2_channel_write

EDIT: Here's the complete code. modified the code to work with a router but the use case is same. Once i issue the password using libssh2_channel_write() subsequent libssh2_channel_read() fails with LIBSSH2_ERROR_SOCKET_RECV. Not sure why. I am…
1
vote
0 answers

Enable SSH2 for PHP 5.4.7 in windows 7 x86 Environment

Hi guys I am in the need to use ssh2 functionalities in php 5.4.7 My configurations are as follows xampp 1.8.3 php 5.4.7 Compiler - MSVC9 (Visual C++ 2008) PHP API - 20100412 PHP Extension - 20100525 Zend Extension - 220100525 Zend Extension Build -…
Kanagu
  • 606
  • 3
  • 9
  • 17
1
vote
1 answer

How do I set ssh credentials for libgit2/libssh2?

I am attempting to push references from within pygit2/libgit2: push_refspec = git_repo.lookup_reference('HEAD').resolve().name logger.info("Pushing " + push_refspec) git_remote.push(push_refspec) However, I get an error about missing…
David Greene
  • 394
  • 2
  • 12
1
vote
1 answer

WordPress error on pllugin update: No support for ssh2 stream timeout. Please recompile with libssh2 >= 1.2.9

I have installed the latest version of libssh2 on my Ubuntu machine in order to enable ssh2 and sftp plugin updates. Unfortunately I get this error: No support for ssh2 stream timeout. Please recompile with libssh2 >= 1.2.9 in…
swogger
  • 1,079
  • 14
  • 30
1
vote
0 answers

PHP close input channel of bidirectional stream from ssh2_exec()

I have a bidirectional stream $stream returned from ssh2_exec($command). The stream represents both the input and output of the command. I can send input to the command with fwrite($stream) and I can read the command's output with fread($stream). I…
Jesse
  • 6,725
  • 5
  • 40
  • 45
1
vote
1 answer

Satis - error with ssh2.sftp protocol

I am trying to host private composer repository with satis (http://getcomposer.org/doc/articles/handling-private-packages-with-satis.md) It works fine through http protocol. I want to secure it with ssh connection as described in security section…
Vaidas Lungis
  • 1,381
  • 8
  • 16
1
vote
1 answer

What's the most straightforward way to add an encryption layer to my TCP client/server app?

I wrote a client/server application that runs over TCP. The server runs at a well-known IP address, and clients connect to the server from various locations on the Internet. The TCP connections to the server are persistent and full-duplex; that…
Jeremy Friesner
  • 70,199
  • 15
  • 131
  • 234
1
vote
2 answers

ssh2 not working for suse

I am trying to ssh from RHEL to SLES machine. I am using PHP function ssh2 to achieve that. Authentication is not happening even after passing correct username and password. But the same code is working fine for RHEL->RHEL. I am able to ssh to the…
Akshatha
  • 15
  • 5
1
vote
2 answers

unable to startup sftp subsystem

I am trying to do a ssh connection in php. But I get this error Unable to startup sftp subsystem. I don't understand it. And I could not find much in google. Please let me know how to debug this. I am using wamp. $resConnection =…
user1346107
  • 157
  • 4
  • 11
1
vote
1 answer

How is Esc,Alt,Ctrl and arrow keys encoded in ssh/shell

I am making a SSH client for a special device which does not have a all keys on it's keyboard, my question is how is the Esc,Alt,Ctrl and arrow keys encoded in the string sent to the shell? is it just '\033'? I know how the Enter key behaves, it…
David Karlsson
  • 9,396
  • 9
  • 58
  • 103
1
vote
1 answer

Correct usage of NMSSH

When a session is created, a shell is started and commands are written: no responses are recieved and the callback methods for the buffer is never called, what did i miss?: (Executing a single command using channel:execute works) -(void)…
David Karlsson
  • 9,396
  • 9
  • 58
  • 103
1
vote
3 answers

PHP ssh2_exec() from Ubuntu Server to Windows with OpenSSH in Cygwin - works but fails the second time

I had been using PHP's ssh_connect() and multiple ssh_exec() between two Ubuntu VMs without any problems. However, now I need to call multiple ssh_exec() from Ubuntu Server to Windows machine via OpenSSH/Cygwin. The result from ssh2_exec() in the…
sagunms
  • 8,030
  • 5
  • 41
  • 43