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

Get data stream from ssh connection using ssh2 on php

I am trying to retrieve a stream of data that comes from an ssh connection. When I use putty to ssh in, I will just start getting data on the screen, no commands were needed. Now I am trying to do the same thing but in php to manipulate the data…
jerrmhs
  • 33
  • 5
1
vote
0 answers

script doesn't wait for the process end with ssh2_exec and stream_set_blocking

I have two scripts : The first one contains the folowing code:
1
vote
0 answers

Libssh2-iOS, CocoaPod linker error

I tried Cocoapod Libssh2-iOS 1.6.0, but got a compile error. It's Xcode 8.2.1. The build of the included openssl stopped with LD_LIBRARY_PATH=: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -DDSO_DLFCN…
Frank Hintsch
  • 560
  • 8
  • 14
1
vote
0 answers

How to install SSH2 for PHP5.6

I need to install SSH2 to my PHP5.6. So as I read this accepted answer I downloaded zip from here then coppied php_ssh2.dll and php_ssh2.pdb to php/ext and libssh2.dll to Windows/system32. And after Apache restart and SSH2 call it throws me this…
Čamo
  • 3,863
  • 13
  • 62
  • 114
1
vote
0 answers

Content of variable disappears

I'm writing a cake-shell-script that connects to a server via ssh and then dumps some mysql-tables. This part is all ok, and the dumps are created; but because there are more than one host from which I want to collect the dumps, there has to be the…
1
vote
1 answer

Reading larger sftp files with ssh2 sftp Node

I'm trying to use the ssh2-sftp library to read/write a file in Node. When I do an sftp.get on a larger CSV file (but not too large -- like 2 MB only) on an sftp site, and then read data on the returned stream, the call is hanging on me after the…
A B
  • 131
  • 1
  • 13
1
vote
0 answers

php ssh2 auto accept 'Y' key

I'm using php ssh2 lib to execute command on server, command code as below: RSC_delete ABCD Are you sure to delete RSC data [N] ('Y' or 'N') Y As you can see it require a 'Y' key for it to execute delete. My PHP code is as follow: …
CodingNuts
  • 19
  • 1
  • 6
1
vote
0 answers

Add the SSH2 extension to MAMP PRO

I am trying to add the ssh2 extension to MAMP PRO without success. Any help would be appreciated! I've gone through these two tutorials, but neither successfully added ssh2. After completing the tutorials I checked my PHP info page, but found no…
Corrin
  • 11
  • 1
1
vote
0 answers

install Net::SSH2 with carton

I want to install Net::SSh2 with Carton: I have locally installed libssh2-1.6.0. exported all necessary LIBSSH2 variables export LIBSSH2_INCLUDE=$HOME/lib/libssh2-1.6.0/include export LIBSSH2_LIB=$HOME/lib/lib export LIBSSH2_LDARGS="-lz" and then…
1
vote
1 answer

Compiling libssh2 in Windows with NMake: Not producing a static library

I am trying to compile libssh2 under Windows with Visual Studio nmake. I am producing a shared library (DLL) but not producing a static library (LIB). I've gone through hours of reading their documentation but have found no mention of generating the…
user0000001
  • 2,092
  • 2
  • 20
  • 48
1
vote
1 answer

libssh2_channel_read file last bytes only

I have an remote big file, and only need to read the last bytes of it. How can I do this? I got this for the whole file, but I don't see where I can only write the last bytes without reading it all. channel = libssh2_scp_recv2(session,…
superbem
  • 441
  • 3
  • 10
1
vote
1 answer

Installing ssh2 on xampp

I am trying to install ssh2 on xampp Xampp version : 3.2.1 PHP version : 5.4.19 Until now I have used following step to install: download and copied libssh2.dll file to c:\windows\system32 php_ssh2.dll and php_ssh2.pdb files in the "ext" (e.g…
user3782114
  • 542
  • 2
  • 7
  • 22
1
vote
3 answers

How to get current directory name from sftp server

I am connecting to remote sftp server using ssh2 functions. Now I need to get current directory name. In case of ftp server I can use ftp_pwd but I can't find similar function for ssh2 I need php code
user3918128
  • 101
  • 1
  • 2
  • 9
1
vote
0 answers

libssh2 - channel read is hanging

I'm currently developing a remote job scheduler on perl. It has to connect via ssh to x servers and execute already defined jobs/jobs groups. I use Net:SSH2 which is build upon libssh2. My program usually works fine with like 400/500 servers, but…
Azryel
  • 71
  • 1
  • 11
1
vote
1 answer

Using libssh2 scp to retrieve a file fails to authenticate when scp from cmd works

I'm trying to retrieve a file from an instance using libssh2 scp. Just to make sure that my username, password, and keys are correct, I did: sudo scp -v -P #port -i /home/username/.ssh/id_rsa username@XX.XX.XX.XX:/home/username/file . Which asked…
Cong Hui
  • 202
  • 5
  • 16