Questions tagged [ssh-tunnel]

The process of enclosing a non-encrypted TCP stream inside of a second, SSH-encrypted stream.

1028 questions
197
votes
7 answers

SSH library for Java

Does anyone have an example of an SSH library connection using Java.
rperez
  • 8,430
  • 11
  • 36
  • 44
98
votes
9 answers

access host's ssh tunnel from docker container

Using ubuntu tusty, there is a service running on a remote machine, that I can access via port forwarding through an ssh tunnel from localhost:9999. I have a docker container running. I need to access that remote service via the host's tunnel, from…
npit
  • 2,219
  • 2
  • 19
  • 25
92
votes
6 answers

Can someone explain SSH tunnel in a simple way?

Although I use some alias to do ssh tunnel or reverse tunnel, I never understand how it works. Does somebody know how to explain it in very simple way? I think the 3 primary uses are: First of all, I can use my home computer to ssh to…
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
74
votes
4 answers

MySQL connection over SSH tunnel - how to specify other MySQL server?

I've got ~50 databases all set up at different host names, with the requirement that I connect to them through an SSH tunnel. For example: SSH host at ssh.example.com MySQL host at mysql1.example.com I have managed to create the tunnel using…
Mad Marvin
  • 3,309
  • 3
  • 18
  • 18
49
votes
10 answers

ssh: check if a tunnel is alive

I have written a small bash script which needs an ssh tunnel to draw data from a remote server, so it prompts the user: echo "Please open an ssh tunnel using 'ssh -L 6000:localhost:5432 example.com'" I would like to check whether the user had…
Adam Matan
  • 128,757
  • 147
  • 397
  • 562
49
votes
3 answers

rsync through ssh tunnel

I want to rsync to a cluster node to which I usually connect passing through another system: Say I connect first to ssh user@bridge and from there to ssh user@clusternode Now I want to rsync from my workstation to clusternode. I do the…
simona
  • 2,009
  • 6
  • 29
  • 41
43
votes
3 answers

PyCharm: Configuring multi-hop remote Interpreters via SSH

To connect to the computer at my office I need to run ssh twice. First to connect to the host-1 and then from host-1 to host-2 and each one has different credentials. However the configuration menu in Pycharm only accepts one ssh tunnel. Configure…
mehrtash
  • 910
  • 3
  • 9
  • 16
37
votes
5 answers

How to create SSH tunnel using PuTTY in Windows?

I need to create SSH tunnel with PuTTY in Windows, that would do the same as this command in Linux: ssh -fN -L 2000:SomeIp:2000 myusername@myLinuxBox I tried many options in PuTTY, including setting source port in GUI to "2000" and destination to…
DixieFlatline
  • 7,895
  • 24
  • 95
  • 147
37
votes
1 answer

SSH tunneling from Heroku

I'm providing a service hosted on Heroku which lets users report on their own data, using their database. My customers have to connect my Heroku app to their database. Some of them are obviously afraid of letting data transit in clear over the…
Adrien
  • 1,075
  • 1
  • 12
  • 18
35
votes
2 answers

How to create web based terminal using xterm.js to ssh into a system on local network

I came across this awesome library xterm.js which is also the base for Visual Studio Code's terminal. I have a very general question. I want to access a machine(ssh into a machine ) on a local network through a web based terminal(which is out of…
Ankit Kulkarni
  • 1,245
  • 3
  • 14
  • 23
35
votes
5 answers

Consume from a Kafka Cluster through SSH Tunnel

We are trying to consume from a Kafka Cluster using the Java Client. The Cluster is a behind a Jump host and hence the only way to access is through a SSH Tunnel. But we are not able read because once the consumer fetches metadata it uses the…
Sourabh
  • 595
  • 2
  • 6
  • 13
33
votes
5 answers

How to create a SSH tunnel using Python and Paramiko?

I need to create tunneling to read information from a database. I use Paramiko, but I have not worked with tunneling yet. Please provide an example of a simple code that creates and closes a tunnel.
Ivan
  • 333
  • 1
  • 3
  • 4
32
votes
1 answer

How tunneling services like 'Localtunnel' works without SSH?

I want to understand how my local IP address (localhost) can be exposed to Internet. For that I've read [here] a method of port forwarding using SSH. Which basically does routing from publicly available server to our localhost using SSH. But I…
Kaushal28
  • 503
  • 1
  • 6
  • 18
31
votes
4 answers

How can I connect to Oracle Database 11g server through ssh tunnel chain (double tunnel, server in company network)?

I have SSH access to 'public' server, which is also the gateway to company network. There is another server in the network, where local Oracle Database server is running (There is no access from outside of this server, only localhost DB connections…
Michal Drozd
  • 1,311
  • 5
  • 13
  • 26
31
votes
5 answers

How to connect MySQL database using Python+SQLAlchemy remotely?

I am having difficulty accessing MySQL remotely. I use SSH tunnel and want to connect the database MySQL using Python+SQLALchemy. When i use MySQL-client in my console and specify "ptotocol=TCP", then everything is fine! I use command: mysql -h…
strevg
  • 445
  • 1
  • 4
  • 18
1
2 3
68 69