Questions tagged [ssh2]
136 questions
1
vote
1 answer
NodeJS SSH2 not authenticating, with known host defined
I am trying to transfer files from one server to another using SSH2 in NodeJS. However, our network admins have setup the private keys for the authorized user and basically just made it possible to connect to the other server via command line like…

TheJason
- 494
- 6
- 18
1
vote
1 answer
Why preferred ciphers, macs and compression are written twice while key negotiations?
I am trying to understand the client part of the SSH protocol and referring the Paramiko library which is a native Python library for SSH protocol. The corresponding code can be found here.
def _send_kex_init(self):
"""
announce to the…

Jayendra Parmar
- 702
- 12
- 30
1
vote
1 answer
Updated Windows and now I can't import ssh2.session?
Working on code that SSH's into terminal on an external device. This morning the code was able to do so. Then I updated Windows because I had put it off for a while. This was the only thing I did that I could think of may have had an effect.
I now…

sinkiez
- 41
- 5
1
vote
1 answer
NodeJS reverse SSH tunnel: unable to bind to serveo.net:80
Context
Not long ago, I discovered a great service called Serveo. It allows me to expose my local apps to the Internet using reverse SSH tunneling.
e.g. Connections to https://abc.serveo.net get forwarded to http://localhost:3000 on my machine.
To…

blex
- 24,941
- 5
- 39
- 72
1
vote
1 answer
How do I download directory with all files and folders inside using npm module ssh2 for nodejs?
I am trying to download files and folders via SFTP to my local machine.I am using the below code and am able to download the files in a particular directory but am unable to download the folders(with their respective files and folders recursively)…

Teknoville
- 459
- 1
- 7
- 18
1
vote
1 answer
Cannot authenticate to SFTP server with phpseclib v2.x - no errors reported
I'm trying to authenticate to an SFTP server with phpseclib, but having issues and am unable to troubleshoot.
Towards the bottom I have posted the troublesome phpseclib code and logs.
Confirming that I do have the correct key
I know I have the…

Keith Palmer Jr.
- 27,666
- 16
- 68
- 105
1
vote
1 answer
Problem with connect to SFTP server via private.key
I have problem with connect to SFTP server via private key.
First, I had the id_rsa.pkk file. I used the PuttyGen program to load the key and convert it to the open-ssh private key as privateKey.pem starting as:
-----BEGIN RSA PRIVATE…

MateuszRyaN
- 21
- 6
1
vote
1 answer
Add text to a file with PHP SSH2
I am trying to create and append to a text file using PHP SSH2. The command I am sending is this:
$cmd = "cd $output_directory; cat > myfile.txt; echo \"My Text\" >> myfile.txt";
The file is created, but the text is not appended to it.
Appreciate…

user3101337
- 364
- 8
- 24
1
vote
2 answers
php(ssh2, tunnel), I can't connect my remote mysql server
$server_ip = "my ubuntu ip";
$server_port = "my ubuntu port";
$server_user = 'my id';
$user_pw = 'my pw';
$connection = ssh2_connect($server_ip, $server_port);
if (ssh2_auth_password($connection, $server_user, $user_pw)) {
…

jinwan kim
- 11
- 2
0
votes
0 answers
mysql pool connection through ssh in nodejs
when I was creating mysql pool with mysql.createPool({}) using mysql2 package in nodejs with 10 connection limit I was able to use 10 connections simultaneously without releasing any connection. but after creating mysql.createPool({}) through ssh…

John George
- 171
- 2
- 11
0
votes
2 answers
ssh key format node.js
I've tried using ssh2 and node-ssh libraries to connect,
but I always get "Cannot parse privateKey: Unsupported key format"
I'm getting the key from AWS secret manager in this format -----BEGIN PRIVATE KEY----- ....---END PRIVATE KEY-----, I tried…

NadavT
- 63
- 4
0
votes
0 answers
How to execute script on local machine from server with ssh2
I want to execute a script that is in a folder in a server machine, over my local machine.
I use ssh2 to create the connection between server and local machine.
const { Client } = require('ssh2');
const fs = require("fs");
const path =…

ddaudiosolutions
- 131
- 2
- 15
0
votes
0 answers
PHP 5.6 Connection SFTP with Private Key
why can't I connect sftp with private key, always get message (SSH public key authentication failed: Invalid Username/PublicKey combination) for private key this tried with filezilla and works fine. here i have tried using cURL & ssh2 but all are…

Skematografi
- 66
- 1
0
votes
0 answers
NODE.JS increase the size of the ssh2-promise result in the exec function
I'm using Node.js to extract some large files (sometimes larger than 2 GB).
Not all the data in these files are needed hence why, is order to avoid downloading the whole file, i'm currently using sshpass command combined with cat and grep on…

nadimgeagea
- 11
- 1
0
votes
1 answer
SSH2 PHP exec remote
I have a game server compilation process in PHP but the exec function is turned off on my hosting. Can we compile it from the ssh2 machine and upload it to the panel? I want to shoot remotely with ssh2 php execLyrics distribution will come for the…

gorkem
- 13
- 2