from the SSH man page: -L [bind_address:]port:host:hostport Specifies that the given port on the local (client) host is to be forwarded to the given host and port on the remote side. This works by allocating a socket to listen to port on the local side, optionally bound to the specified...
java,ssh,reverse,jsch,ssh-tunnel
There is an example gist that shows how to do it here: https://gist.github.com/ymnk/2318108#file-portforwardingr-java The method you want to look at is session.setPortForwardingR() session.setPortForwardingR(rport, lhost, lport); ...
node.js,ssh,vagrant,ssh-tunnel
You could try using a provision shell script (tunnel.sh) which would create a remote port forwarding to your machine: #!/bin/bash # executed from 'vagrant' ssh -R 5858:127.0.0.1:5858 [email protected] Actually you should put this script in the same folder than your Vagrantfile, and edit the Vagrantfile to add this lines: Vagrant.configure("2")...
ssh [email protected] sh - < mylocalscript.sh Test it directly on your machine: echo ls | ssh localhost sh - UPDATE To the comment: a trick sometimes employed by distro-agnostic deployment scripts is to embed a static, standalone image (make sure the kernel is compatible): Live On Coliru The base64 data...
a SOCKS proxy setting on jsch allows you to connect to a running proxy server on the remote side. An sshd on the remote side would not be considered a SOCKS proxy. What you will have to do is establish a local port forward to the ssh port on the...
As silly as it sounds replacing localhost with an IP address (127.0.0.1) solves the problem. src_mysql( dbname = "mydb", user = "mysqluser", password = "mypassword", host = "127.0.0.1", port=3307) For an explanation take a look at the MySQL documentation: On Unix, MySQL programs treat the host name localhost specially, in...
ubuntu,port,portforwarding,ssh-tunnel
The solution is in /etc/ssh/sshd_config uncomment GatewayPorts Yes, restart, and it'll work perfectly.