An SSH tunnel allows forwarding any traffic over the SSH protocol. This is used to secure the transmission or allow data to be exchanged where network restrictions are in place.
Questions tagged [ssh-tunnel]
554 questions
244
votes
8 answers
How to make an SSH tunnel publicly accessible?
Referring back to this question, I am executing the below via OpenSSH (Client: Mac OS X 10.6 | Server: Linux Mint), however the port that is being tunneled is not working publicly:
ssh -R 8080:localhost:80 -N root@example.com
The purpose is so the…
![](../../users/profiles/138783.webp)
Trevor Rudolph
- 2,581
- 3
- 16
- 14
103
votes
11 answers
List open SSH tunnels
I use a lot of SSH tunnels to various servers on my linux machine (for tunnelling to databases, web servers etc) and it would be really handy to view a list of current open tunnels via a shell script.
I can identify local connections via a grep on…
![](../../users/profiles/68488.webp)
James Frost
- 1,133
- 2
- 8
- 5
79
votes
2 answers
Differences between ssh -L to -D
I'm trying to understand the differences between ssh -L to -D.
Is there anything else except for that -D is SOCKS only?
Thanks!
Marvin
50
votes
9 answers
Automatic SSH tunneling from Windows
I'm trying to set up a Windows computer to always have two SSH tunnels to my Linux server.
Currently, I'm using PuTTY to open the two SSH tunnels: I log in to the server in PuTTY, leave it minimized, and never touch it. This works well, except when…
![](../../users/profiles/63848.webp)
David Yaw
- 797
- 2
- 7
- 13
45
votes
5 answers
SSH access to office host behind NAT router
I would like to access the ssh port of my office linux host from home. Unfortunately the host is located behind a NAT router. So, the IP address is not publicly available. There is however access to another internet host (Server) which is…
![](../../users/profiles/79095.webp)
ritter
- 735
- 1
- 6
- 9
36
votes
5 answers
SSH Reverse socks tunnel
ssh -D can make a socks port at local machine, which pass the traffic to the remote, then to other places.
ssh -L port:host:hostport, listen port at local machine, pass the traffic to "host:hostport" from the point of view of the remote machine.
ssh…
![](../../users/profiles/109350.webp)
Berry
- 471
- 1
- 5
- 5
32
votes
2 answers
SSH as socks proxy through multiple hosts
Can the following be achieved with SSH.
There are three machines involved:
A. My local machine at home
B. The SSH gateway server at school
C. A workstation in a lab, only reachable through B
I want to setup a SOCKS proxy. I want to be able to surf…
![](../../users/profiles/96961.webp)
Sébastien
- 323
- 1
- 3
- 4
30
votes
3 answers
How secure is an SSH tunnel or connection?
I have often advised people to use an SSH tunnel to secure their browsing on open WIFIs or in other insecure situations.
I was recently asked by a friend how secure a SSH tunnel is after I had suggested SSH tunneling. I stumbled a bit and reiterated…
![](../../users/profiles/56701.webp)
madmaze
- 4,186
- 6
- 34
- 46
27
votes
6 answers
How do I SCP a file through an intermediate server?
I'm using Ccygwin on WinXP (with the bash shell). I want to SCP a file from my localhost to a remote machine -- host2. However, I can only SSH to an intermediate machine -- host1, and then from there SSH to host2. (Note, I ccan't access host2…
![](../../users/profiles/149686.webp)
Dave
- 271
- 1
- 3
- 3
21
votes
2 answers
Setting up ssh config file with id_rsa through tunnel
I've been struggling to set up a valid configuration to open a connection with a second machine, passing through another one, and using an id_rsa (which requests me a password) to connect to the third machine.
I've asked this question in another…
![](../../users/profiles/182272.webp)
Rubens
- 650
- 1
- 6
- 16
20
votes
5 answers
Is there a sshuttle equivalent for windows - ssh tunneling for windows
I have been using sshuttle on my linux desktop for a long time to circumvent the restrictions of vietnamese ISPs. However I wonder if there's a similar easy to use software for windows? Something that can redirect all/selected traffic through a ssh…
![](../../users/profiles/38302.webp)
freethinker
- 3,660
- 3
- 22
- 21
18
votes
3 answers
SSH tunnel on Windows 10 to Linux Samba
I know This question has been asked a few times already but I think my problem might be slightly different. Maybe I'm not understanding the fundamentals of the issue.
I have a Linux Samba share that I would like to ssh tunnel and use from Windows.…
![](../../users/profiles/611394.webp)
Blake Wrege
- 183
- 1
- 1
- 7
16
votes
2 answers
How to determine the port allocated on the server for a dynamically bound openssh reverse tunnel?
When creating reverse tunnels on recent versions of OpenSSH,
a remote port of 0 can be given to bind any available port:
-R [bind_address:]port:host:hostport
...
If the port argument is `0', the listen port will be dynamically
allocated on the…
![](../../users/profiles/86211.webp)
codedstructure
- 278
- 2
- 6
13
votes
2 answers
VSCode SSH with multiple hops
I'd like to edit code on a remote machine. The VSCode SSH extension offers this feature, but I can only get it to work for a single hop. Here's what I've tried so far:
Click on 'Remote Explorer' in VSCode sidebar
Click + for 'Add Target'
Enter the…
![](../../users/profiles/917655.webp)
Jacob Stern
- 861
- 2
- 8
- 14
12
votes
4 answers
How can I resume a large scp file transfer when using port forwarding?
I have a machine a couple of hops away, and I need to set up port forwarding in order to transfer files.
Edit: To be clear, the multiple hops are needed in order to access the remote machine. From my machine, I set up a VPN, where I can access…
![](../../users/profiles/1146.webp)
chris
- 9,287
- 20
- 67
- 85