ssh-tunnel

How to use Node.js to make a SSH tunneling connection to a MongoDB database

这一生的挚爱 提交于 2019-12-09 01:47:42
问题 My credentials work perfectly with Robomongo but I can't make the connection with node.js I have tried to make the connection using ssh2 and tunnel-ssh npm module and failed both times. -The mongo connection does not require a password -The ssh connection is made with a pem key This is the code I've used with ssh2 module, I can establish the tunneling correctly but the mongo connection fails var Client = require('ssh2').Client; var conn = new Client(); conn.on('ready', function() { console

ssh tunnel for elasticsearch

折月煮酒 提交于 2019-12-08 11:15:20
问题 I am on a vpn which does not allow access to elasticsearch directly, so I am trying to ssh tunnel to an external box that has access. I am tunneling with the following: ssh -L 12345:<elastic_ip>-east-1.aws.found.io:9200 but then if I curl: curl http://user:pass@localhost:12345 I get: {"ok":false,"message":"Unknown cluster."} Yet, if I try this from the box directly: curl http://user:pass@<elastic_ip>-east-1.aws.found.io:9200 I get: { "status" : 200, "name" : "instance", "cluster_name" : “

Xdebug with SSH tunnel on Docker for Mac

旧街凉风 提交于 2019-12-08 06:26:15
问题 I was reading a lot of posts from the Docker community recently on how to debug PHP application in the PHPStorm with the Docker for Mac. All of them contains pieces of useful information, but haven’t seen working solution in one place. 回答1: Here is what did work for me. Inside Docker Container Edit xdebug configuration # automatically start debugger on every request xdebug.remote_enable=1 xdebug.remote_autostart=1 xdebug.remote_port=9000 # send all debug requests to 127.0.0.1, remote_connect

How to use JProfiler over two-hop SSH tunnel

心已入冬 提交于 2019-12-08 02:41:28
问题 I'm trying to connect JProfiler to a JVM running on a server that I'll call remote . This server is only accessible from my workstation ( local ) via another server that I'll call middle . My plan for connecting JProfiler to remote was this: Install the JProfiler instrumentation on remote Establish SSH tunnel from local , through middle , to remote : ssh -v -N -L 8849:[remote's private address (192.168... etc)]:8849 [middle] Establish a new JProfiler session on localhost:8849 , choosing

SSH Tunnel through Ubuntu bastion to EC2 instance in private subnet

纵饮孤独 提交于 2019-12-07 17:52:07
问题 According this AWS doc: Scenario 2: VPC with Public and Private Subnets (NAT) I have my own VPC with two subnets: private and public. In public subnet I have deployed an Ubuntu 16.04 Instance with assigned EIP. It also has next security group inbound rules: Type Protocol Port Range Source Description SSH TCP 22 xx.xx.xx.xx/32 Home IP and outbound accordingly: Type Protocol Port Range Source Description SSH TCP 22 sg-xxprivatexx Security group ID for instance in private subnet Looks nice, I

pycharm remote debugging: failed to find free socket

十年热恋 提交于 2019-12-07 07:51:39
问题 I'm trying to use remote debugging but get this error on pycharm: Error running remoteTest: failed to find free socket My remote host is Ubuntu |(with username and password) and my localhost is windows, I followed the following tutorial: https://blog.jetbrains.com/pycharm/2010/12/python-remote-debug-with-pycharm/ and I used a ssh tunnel on putty to connect to the server. import pydevd pydevd.settrace('localhost', port=21000, stdoutToServer=True, stderrToServer=True) 来源: https://stackoverflow

How to do multihop ssh with fabric

北慕城南 提交于 2019-12-07 07:11:23
问题 I have a nat and it has various server So from my local server I want to go to nat and then from nat i have to ssh to other machines Local-->NAT(abcuser@publicIP with key 1)-->server1(xyzuser@localIP with key 2) nat has different ssh key and each of the server has different ssh key how can i accomplish this type of multihop ssh using fabric I tried using env.roledefs feature but it doesnt seems to be working also I am not sure how to define two ssh keys.I know we can define a list of keys

How to use JProfiler over two-hop SSH tunnel

拈花ヽ惹草 提交于 2019-12-06 09:33:39
I'm trying to connect JProfiler to a JVM running on a server that I'll call remote . This server is only accessible from my workstation ( local ) via another server that I'll call middle . My plan for connecting JProfiler to remote was this: Install the JProfiler instrumentation on remote Establish SSH tunnel from local , through middle , to remote : ssh -v -N -L 8849:[remote's private address (192.168... etc)]:8849 [middle] Establish a new JProfiler session on localhost:8849 , choosing "Startup immediately, connect later with JProfiler GUI" However, I end up getting an error: Connection error

cURL request using socks5 proxy fails when using PHP, but it works through the command line

≯℡__Kan透↙ 提交于 2019-12-05 04:25:37
cURL + proxy noob here, having a hard time. I'm having trouble trying to retrieve a web page from a remote secure server via a proxy. Everything has apparently been set up correctly by a remote dev, such that the following command line instruction works and returns what we're looking for: curl -k --socks5-hostname localhost:xxxx https://hostname/ However, the following PHP does not echo the requested webpage. Instead it echoes the error 'Couldn't resolve host name': $proxy = 'localhost:xxxx'; $url = 'https://hostname/'; //$proxyauth = 'user:password'; $ch = curl_init(); curl_setopt($ch,

Trouble SSH Tunneling to remote server

可紊 提交于 2019-12-05 02:38:31
问题 I am trying to get from my local machine to a remote vendor's website that is locked down by IP (our corporate servers are allowed access). I am doing this by tunneling from a server that can access the API without issues, however, when I setup the SSH tunnel and go to a URL on the vendor website, I get a 404 Not Found error. Here is what I'm using: ssh -f -N user@example.com -L 7777:vendorhostexample.com:80 Everything indicates that the tunnel is setup correctly, but if I try a URL such as