Questions tagged [ssh2]

136 questions
1
vote
0 answers

Using nodejs ssh2 within a web worker

I'm trying to use from a nx project (using @nrwl/node), within a nodeJS API, the ssh2 plugin. Here's my module: export const datasetTranferModule = ({ username, password }) => { var connSettings = { host: "192.168.1.14", port: 22, …
dbrrt
  • 2,275
  • 4
  • 18
  • 35
1
vote
1 answer

Unable to switch user to root using Node.js ssh2 module

Trying to SSH to a server and able to. However, when I try to run sudo command it prompts me to enter the password of the userid mentioned. How do I prevent any keyboard interruption and hardcode the password so it doesn't prompt for…
roman95
  • 73
  • 1
  • 6
1
vote
0 answers

Python SSH Interactive Shell call back on data receive

I'm trying to implement a interactive SSH shell using python as back-end. Basically I want to pass each character to shell along with and special character like new line, Ctrl-C. Then pass back the result. I found similar solution in node.js at…
pab789
  • 123
  • 1
  • 10
1
vote
0 answers

How to use output from npm simple-ssh exec command outside of the command itself?

I am trying to implement a new feature for our in-house brand of hubot. The feature uses the npm package simple-ssh (wrapper for ssh2) and basically takes an environment (i.e. "@hubot get versions DEV) as input, gets the servers and credentials for…
1
vote
1 answer

PHPSECLIB and SSH2

I have been looking for a solution on how I could use php to establish a connection to a remote server and execute commands. Researching has brought two solutions to my attention; phpseclib and ssh2. I will try and keep my questions from turning…
Newb 4 You BB
  • 1,205
  • 1
  • 11
  • 30
1
vote
0 answers

Problem when I assign a variable to ssh2_sftp($connection)

I'm trying to use ssh2_sftp($connection) but if i assign variable like that $sftp = ssh2_sftp($connection) My serveur return error 503 But if i do print_r(ssh2_sftp($connection)) i've ressource : Resource id #137 The problem is for the rest of the…
laurent
  • 67
  • 6
1
vote
1 answer

Converting SSH2 Key to OpenSSH Format

On Ubuntu I generated a key using ssh-keygen -t rsa -b 4096 command. While trying to convert the generated key to OpenSSH format with ssh-keygen -i -f id_rsa.pub > id_rsa_openssh.pub, I get error uudecode failed. Any idea how to resolve this…
Jatala
  • 93
  • 1
  • 11
1
vote
1 answer

Trouble installing ssh2-python. I need help understanding terminal error code and what I need to do next

I am trying to install ssh2-python but I am having trouble. I have downloaded the most up to date python (python3), pip (pip3), and installed cmake. I am getting this error below when I run the install command. Any help digesting this error code and…
George
  • 31
  • 4
1
vote
0 answers

PHP-7.0 SSH2 Module does work in command line but not on website

I want to install SSH2 on my Server and I did it via PECL. I used PECL because I want ssh2 version 1.2 and not the default apt version which is 0.12. Unfortunately, I somehow can't use it I have following file: test.php
peter12908
  • 21
  • 2
1
vote
1 answer

Error Installing "ssh2-python" on windows

I am trying to install ssh2-python in windows via pip command. I am getting the following error. Can anyone of you let me know what this error is and how this can be fixed. Collecting ssh2-python Downloading…
Sujesh Surya
  • 143
  • 1
  • 1
  • 12
1
vote
1 answer

node.js ssh2 => how to close connection and handle ECONNRESET error

In a node.js project, I have installed and configured OPENSSH on a remote windows machine and trying to execute commands from local windows server using ssh2 (latest version) package. There is one exe file on remote machine which keeps on running…
usersam
  • 1,125
  • 4
  • 27
  • 54
1
vote
0 answers

Paramiko exec_command() not executing command on remote linux server

I am working on a Python 3.7 script to connect and execute commands on the remote Linux server. I have used paramiko and ssh2.session libraries, the script was able to connect to the remote server but command is not executed. Remote server…
rohit
  • 65
  • 10
1
vote
1 answer

Not able to install ssh2 in centos 7

I am not able to install ssh2 in centos. I using apache2 and PHP 7.3 I using below command and giving me error as below yum install gcc php-devel libssh2 libssh2-devel php-pear make pecl install -f ssh2 but it's showing me below error No package…
Niraj Savaliya
  • 179
  • 1
  • 14
1
vote
2 answers

How to install ssh2 on Centos?

I want to install ssh2 on Linux server, with Centos 7 and PHP 7.3 Tried following steps: yum install gcc php-devel libssh2 libssh2-devel php-pear make pecl install -f ssh2 Step 2 gave make error Step 2 error Step 2 error p2 Here are some of the…
1
vote
2 answers

With SSH2 and phpseclib, how do I upload a file to Amazon EC2 server in PHP?

I am trying to create a web interface where users can upload an image file, and this file will be sent to my Amazon EC2 server. I was told to use phpseclib instead of PHP SDK for this and I have tried the following code: testform.php
Tina
  • 179
  • 1
  • 3
  • 13
1 2
3
8 9