Questions tagged [ssh-tunnel]

An SSH tunnel leverages the SSH protocol to transport unencrypted data through an encrypted connection.

An SSH (secure shell) tunnel provides a secure connection through which unencrypted data can be sent.

This technique can be useful for:
- Providing security for insecure network protocols.
- Hiding one's true location (ip).
- Circumventing blocked ports in firewalls.

857 questions
5
votes
5 answers

Add temporary entry to hosts, when tunnelling SSH

When outside our company firewall, I use a script to tunnel via SSH and expose our internal wiki to my OSX machine. Is there a command to temporarily tell OSX to resolve to my local port when the tunnel is set up? The sequence I'm hoping to use…
pufferfish
  • 2,830
  • 11
  • 39
  • 40
5
votes
1 answer

autossh works as expected by systemd setup for boot fails

So I setup my ssh variables to do a reverse tunnel in ~/.ssh/config and called the host tunnel_reverse. I tested the following command to create a persisting tunnel with autossh and it worked just as expected: autossh -M 0 -N tunnel_reverse I…
Geryon
  • 51
  • 1
  • 2
5
votes
1 answer

How to remove a port bind still used by sshd after an improper deconnection from ssh?

Note: this post is not a duplicate of SSH remote port forwarding failed. The question here is not what causes port forwarding (temporarily) failure, we know what it is. The question is how to remove the broken sshd port bind. Thank you. I have a…
hello world
  • 123
  • 3
  • 8
5
votes
1 answer

Working example of multiple permitopen options in authorized_keys

I have a working key in .ssh/authorized_keys with a single permitopen option configured. I went to add an additional permitopen and it does not allow tunnels to the new server. The documentation says: Multiple PermitOpen options may be applied to…
Shawn McGough
  • 511
  • 6
  • 9
5
votes
1 answer

How to connect an isolated node to a public node via SSH tunnel

I am not sure how to put it in words, so created a illustration to show what my setup is like. DB Server and Web Server are in a VLAN, Web Server has a public IP, but DB Server does not. Normally DB can only talk to Web Server. Exception is that it…
code90
  • 173
  • 1
  • 7
5
votes
1 answer

Tunnel closed. packet_write_wait: Connection to UNKNOWN port 0: Broken pipe

Hello community for several days I am having problems to keep connected to a ssh tunnel that I perform to a VPS. After 2 to 4 minutes, I get this error: Tunnel closed. packet_write_wait: Connection to UNKNOWN port 0: Broken pipe. I have been reading…
5
votes
1 answer

SSH tunnel for 3 hops and copying files

I've managed to do ssh tunnel just for two hops ssh -L 1234:serverB:22 user@serverA scp -P 1234 user@localhost:/file /file Now I need to go from localhost -> serverA - >serverB ->serverC And to copy files between localhost and serverC
lbanz
  • 1,609
  • 5
  • 20
  • 30
5
votes
1 answer

reliable systemd service for autossh

I try to create a reliable systemd service for autossh. The service works, but if the host-keys changes, the service is in state ok (running). I want it to be in state "failed" if the tunnel does not work. Here is my current systemd service file: #…
guettli
  • 3,591
  • 17
  • 72
  • 123
5
votes
2 answers

Sharing SSH port tunnel with local network

I've successfully created a SSH tunnel to our cloud postgresql server on a local linux server, with this command: ssh -N -f -L 5431:localhost:xxxx mycloudserver.com (where xxxx is remote port) With this command I can access remote PostgreSQL…
5
votes
2 answers

Failed to start stunnel4 on Ubuntu 15.04

I get the following error starting stunnel4 service on Ubuntu 15.04: root@scw-d91ec7:~# service stunnel4 start Job for stunnel4.service failed. See "systemctl status stunnel4.service" and "journalctl -xe" for details. root@scw-d91ec7:~# systemctl…
BBJ3
  • 177
  • 1
  • 1
  • 6
5
votes
2 answers

SSH tunnel to Docker container

Goal: connect locally to a remote repl (e.g. via lein repl :connect). Locally, this is easy: Run server (it starts an embedded nrepl server on port 8081) Run lein repl :connect 8081 & voila! repl connected I've also done this to connect to a repl…
Ryan Wilson
  • 81
  • 1
  • 1
  • 5
5
votes
2 answers

(reverse-) ssh connection "time out during banner exchange"

I have set up a few 100 embedded boxes to contact HQ by opening up reverse ssh tunnels, each under a new port. This is mostly working fine, but today I encountered a problem with using the tunnel through a low bandwidth (or low quality?) GPRS…
Christian
  • 191
  • 1
  • 1
  • 8
5
votes
4 answers

Remote Desktop over SSH to Windows 7 box

I have been using remote desktop to access a Windows 7 PC, tunneled over an SSH connection, successfully for a while now, until it suddenly stopped working. The client is also Windows 7, and I double checked that the tunnel (with putty) was set up…
mishac
  • 150
  • 1
  • 2
  • 5
5
votes
0 answers

restrict ssh reverse portforwarding per user

I have a server that needs to accept incoming ssh connections with portforwarding. The incoming clients request a port forward from a port on the server to a port locally. They authenticate using a public/private key. So: on the client end -R…
Rudi
  • 51
  • 2
5
votes
1 answer

How do I configure pfsense as an outbound VPN client?

We use pfsense as a router/firewall. Because we're based in China, it is useful for us to have VPN access for all our internal clients. Instead of each individual client connecting to a VPN server stateside, I'd like to configure pfsense as a VPN…
Son of the Wai-Pan
  • 757
  • 4
  • 11
  • 25