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

PHP ssh2_auth_pubkey_file not working with encrypted private key

I am using ssh2 in PHP, as follows: $connection = ssh2_connect($host, $port); ssh2_auth_pubkey_file($connection, $username, $pubKey, $privKey, $passphrase); This results in the error message: ssh2_auth_pubkey_file(): Authentication failed for…
bcmcfc
  • 25,966
  • 29
  • 109
  • 181
0
votes
1 answer

libssh2 remote ncurses application

I'm in the initial stages of designing an app that will connect to a remote server via ssh using the libssh2 library. One of the features I would like to have is the ability to be able to interact with a remote ncurses application. I understand that…
Justin Kredible
  • 8,354
  • 15
  • 65
  • 91
0
votes
2 answers

Getting Process ID of started process using SSH2 - phpseclib

I am using phpseclib, Net_SSH2. I need to get the process ID of the server/process that is started by this command. echo $ssh->exec('java -Xmx256M -Xms32M -jar minecraft_server.jar nogui'); This is so i can store it and be able to kill it via a PHP…
Harry Beasant
  • 1,014
  • 8
  • 18
0
votes
2 answers

libssh2_scp_recv is not populating struct stat

I can successfully send files from one end to another using libssh2_scp_send(). When I try to receive files using libssh2_scp_recv(), though, it does not fill the struct stat parameter with data. The file size always returns "0". struct stat …
JaxWR
  • 226
  • 2
  • 7
0
votes
1 answer

Sending an array to device via libssh2

I'm playing around with libssh2 and have managed to get this test application to work on my iPhone (running 5.1.1) http://www.x2on.de/2011/02/02/libssh2-for-ios-iphone-and-ipad-example-app-with-ssh-connection/#comment-1281 The application connects…
René Josefsen
  • 143
  • 2
  • 11
0
votes
2 answers

Escaped Quotes in PHP for Sed Command

I have the following php code if (!($stream = ssh2_exec($con, 'sed -i \'s/motd=A Minecraft Server/motd=\'.$name.\'s Server/g\' /home/servers/runner15/server.properties '))) { But when I run it instead of replacing the text "motd=A Minecraft…
Jeremy Sayers
  • 637
  • 4
  • 10
  • 23
-1
votes
1 answer

scp using libcurl fails

I am trying to use programmatically libcurl that is built with OpenSSL 1.1.1 and libssh2 to do scp of files. It fails with the error below on the application side. Is there any hint of what could be going wrong? Debug details: Trying…
Satish Burnwal
  • 487
  • 1
  • 4
  • 11
-1
votes
1 answer

Errors after importing ssh2 module of npm

I have a task of doing ssh into a cluster and execute spark code. This has to be done from the browser. I am using Reactjs to build UI and 'ssh2' from NPM to access the cluster. When I use the following code. var Client = require('ssh2').Client; I…
-1
votes
1 answer

shell commands dont work on nodejs ssh2

I'm using the following library to do: http://maboiteaspam.github.io/ssh2-utils/ Login to altus instance Go to a directory. This is my code: function postRun(url){ ssh.runMultiple(server, "sudo docker exec -it abcas /bin/bash",…
TechnoCorner
  • 4,879
  • 10
  • 43
  • 81
-1
votes
1 answer

How to find which version of libssh2 is required for my php version (on Windows)

When I check my php version I get the following warnings: PHP Warning: PHP Startup: ssh2: Unable to initialize module Module compiled with module API=20121212 PHP compiled with module API=20131226 These options need to match in Unknown on line…
BebopSong
  • 284
  • 1
  • 4
  • 8
-1
votes
1 answer

php ssh2_scp_send inside a for-loop fails for the second time onwards

I have a folder which has 2 files.When I am running the below code, it works for the first loop but second time onwards it fails with the warning as - Warning: ssh2_scp_send(): Failure creating remote file: Unexpected channel close in…
M3ghana
  • 1,231
  • 1
  • 9
  • 19
-1
votes
2 answers

php sftp using ssh2 corrupting pdf files

I'm trying to transfer a pdf file from our server to another via SFTP. I've checked the files and they are not inherently corrupt. I can scp them on the command line to my computer and they open just fine. Note: I can successfully transfer the pdf…
Pete_1
  • 981
  • 3
  • 14
  • 23
-1
votes
1 answer

Nginx account create via PHP script?

I am trying to prepare PHP script with the new server nginx web server. Unfortunately, I havent dealt with SSH2 before for php. Maybe some good forum would be able to help me with this?
kalmer
  • 11
  • 1
-1
votes
1 answer

"Ressource id #5" returned when using mysql in ssh2_exec

I am using ssh2 to make a mysql query on a remote server. Here are my lines: $connection = ssh2_connect("ip_address", 22); if (ssh2_auth_pubkey_file($connection, "user", ".ssh/id_rsa.pub", ".ssh/id_rsa")) { echo("Ok"); } else { die("KO"); } $stream…
stupigou
  • 21
  • 3
-1
votes
1 answer

Which PHP value has a timeout of 900 seconds?

I have a script that is called over apache 2.4 on Ubuntu 14.10. All sites work fine but one that doesn't work on one of my computers. The page-generation dies after exactly 900 seconds (15 Minutes). In my /etc/php5/apache2/php.ini there is no such…
rubo77
  • 19,527
  • 31
  • 134
  • 226
1 2 3
19
20