Skip to main content

Questions tagged [ssh-tunnel]

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.

Filter by
Sorted by
Tagged with
252 votes
8 answers
207k views

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:...
Trevor Rudolph's user avatar
109 votes
12 answers
255k views

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. ...
James Frost's user avatar
  • 1,193
80 votes
2 answers
95k views

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!
user avatar
50 votes
9 answers
103k views

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,...
David Yaw's user avatar
  • 797
45 votes
5 answers
54k views

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 ...
ritter's user avatar
  • 735
38 votes
5 answers
51k views

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" ...
Berry's user avatar
  • 491
32 votes
2 answers
26k views

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 ...
Sébastien's user avatar
31 votes
3 answers
44k views

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 ...
madmaze's user avatar
  • 4,286
30 votes
6 answers
70k views

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 ...
Dave's user avatar
  • 301
21 votes
5 answers
42k views

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 ...
freethinker's user avatar
  • 3,710
21 votes
2 answers
29k views

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 ...
Rubens's user avatar
  • 670
18 votes
2 answers
24k views

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 ...
Jacob Stern's user avatar
18 votes
3 answers
42k views

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 ...
Blake Wrege's user avatar
16 votes
2 answers
4k views

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 ...
codedstructure's user avatar
13 votes
4 answers
9k views

SSH connection between two behind-nat computers through third public-ip computer

I have a computer at home (home-server) that runs irssi, rtorrent etc. My ISP is blocking every traffic from outside (dumb, I know, but it's the only ISP I can have). I want to be able to log in into ...
seler's user avatar
  • 363
13 votes
2 answers
23k views

SSH tunnel to home network, and access router web interface

I'm trying to use an ssh tunnel from a remote location to connect to my home network and access the router web interface. I have SSH access to the home network, and I can connect to the gateway ...
ocodo's user avatar
  • 1,796
12 votes
5 answers
42k views

What is the difference between local and remote IP forwarding?

What is the difference in functionality between the two? I'm a bit confused by it. Local forwarding makes a remote port locally available. Remote forwarding makes a local port remotely available. ...
nandaloo's user avatar
  • 223
12 votes
4 answers
25k views

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 ...
chris's user avatar
  • 9,425
12 votes
1 answer
14k views

ssh inline proxy jump using keys is not working

I need to establish a connection to a remote server via proxy jump. I'm trying to use the -J flag to do that. I understand that the syntax looks like this: ssh -J A B But I need to use key files for ...
Caballero's user avatar
  • 253
12 votes
4 answers
51k views

Configuring an SSH tunnel with FileZilla

Is there any way to configure FileZilla on Microsoft Windows so that it connects to an SFTP server through some SSH tunnel? E.g., with WinSCP, I can do the following: I don't want to have to launch ...
Franck Dernoncourt's user avatar
11 votes
3 answers
10k views

An equivalent of ssh port-tunneling for Windows servers?

my home is Linux servers where SSH can always be used to get around a slightly-too-restrictive firewall. At work however, all of the servers we deal with are Windows based. I'm needing to connect to ...
Earlz's user avatar
  • 4,474
11 votes
4 answers
6k views

SSH Tunnel doesn't work in China

Last year I was working in China for a few months. I never bothered setting up a real VPN, but just created a SSH tunnel, and changed my browsers proxy settings to connect through it. Everything ...
Martin's user avatar
  • 119
10 votes
3 answers
10k views

How can I set in the bitvise ssh client, the tunnel automatic connect if open windows or restart windows?

Now the tunnel works if I open the bitvise application and click the login button. I want to change that. I want the tunnel automatic open if open windows or restart windows Where I can set the ...
Success Man's user avatar
10 votes
4 answers
13k views

Finding IP or hostname of origin machine (ssh)

I connect to a number of machines constantly, from different physical locations (and thus different physical machines). Most of this is done though ssh, sometimes a gateway machine or two is required (...
Geodesic's user avatar
  • 208
9 votes
4 answers
5k views

If I use an SSH tunnel to get around a firewall, what does the sysadmin see?

I use an SSH tunnel for the port my browser uses to access the internet. The result is I get around the firewall my network uses, which prevents me from using many sites I want to use (facebook, ...
Tony Stark's user avatar
  • 2,370
9 votes
1 answer
3k views

How can I mosh over multiple hops (for example, via tunnel or ProxyCommand)?

I have a system that I can only access via multiple ssh logins. I recently found out about using ProxyCommand or SSH tunnels to make the connection transparently. Is it possible to mosh instead, and ...
lofidevops's user avatar
  • 1,338
9 votes
2 answers
5k views

Dropped ssh/X session, how to pickup where left off?

I am VPN from a Linux box to another. I log in to the other box with ssh -X. I open an X window/program in an attempt to do a software installation. The painful truth is that this software cannot be ...
Charlie Wilson's user avatar
9 votes
0 answers
8k views

Why is there no UDP port forwarding in SSH?

I know SSH can forward TCP ports, not UDP. I'm not seeking help to circumvent this restriction (this subject is covered here). I'd like to know what is the reason SSH never got UDP forwarding ability....
Kamil Maciorowski's user avatar
8 votes
3 answers
1k views

SSH parameterized config entries?

I often setup port forwards with something like: ssh -NL 1234:localhost:1234 MyHostName The ports usually stay the same, but the remote changes. It would be nice if I could create SSH entries like: ...
Nathan Fig's user avatar
8 votes
2 answers
11k views

SSH Tunnel via native Windows bash: Address already in use

I am trying to setup a SSH Tunnel on my Windows machine. Since the bash was introduced in 1607, i don't want to use cygwin anymore. The problem is that the bash always returns the error message: bind: ...
ˈvɔlə's user avatar
  • 180
8 votes
1 answer
11k views

SSH: Effects of no-pty login option in authorized_keys

I'm confused by the behavior of restrict or no-pty login options prepended to a key in ~/.ssh/authorized_keys. For a given key I was intending to prevent any interaction except for starting an SSH ...
Tad Lispy's user avatar
  • 931
8 votes
1 answer
3k views

Using reverse SSH to connect two clients over one server

I’m trying to set up multiple client PCs that are behind a firewall with dynamic IP addresses to have an SSH connection available for another PC. My theory is to set up a server with a publicly ...
Daniel's user avatar
  • 538
8 votes
2 answers
6k views

Reverse sshfs tunnel

Hey I want to setup a reverse sshfs tunnel. I have a home server which sits behind some type of NAT which makes it impossible for a remote computer to sshfs the home file system. On the local computer ...
Kurent's user avatar
  • 111
8 votes
3 answers
26k views

Accessing IPv6 addresses through an SSH tunnel

I have a remote Arch Linux server which has IPv6 enabled (through Tunnelbroker, I am able to do ping6 ipv6.google.com successfully) and I want to know if it's possible to use PuTTY on my Windows 7 ...
Zack Zatkin-Gold's user avatar
7 votes
1 answer
12k views

ssh config for multiple proxy jumps

I have a setup where I need to do 2 proxy jumps in order to connect to my server D. Effectively, from A, I need to connect to B, from which I need to connect to C (which only allows connections from B)...
Jimmy2027's user avatar
  • 203
7 votes
2 answers
7k views

SSH forwarding through PuTTY not working on Windows 10

I'm trying to set up an SSH tunnel in PuTTY to connect to a RHEL server's database using MySQL Workbench over SSH. I set up an SSH session on port 22 to the server, then under SSH > Tunnels, I ...
noSoup's user avatar
  • 111
7 votes
2 answers
2k views

How to connect to a SSH session that was backgrounded with -f -N?

I'm doing some work where I need to pivot off a machine using proxychains so I'm connecting to a system and binding a local port like so... ssh -f -N -D 9000 [email protected] … which returns me back to ...
Kevin's user avatar
  • 103
7 votes
3 answers
16k views

Using WinSCP with SFTP server and two SSH tunnel hops

I'm on a Windows machine using PuTTY to ssh into my schools server. From there I need to slogin -XY machine1 and then slogin -XY machine2. Ideally, I'd like to use WinSCP to connect and transfer ...
Mike's user avatar
  • 71
7 votes
3 answers
6k views

How to script a database migration using an SSH tunnel?

I am trying to create a sync.sh script that coordinates with our less-than-ideal version control for our website. This script will migrate a live copy of the database to our development environment ...
Thank you's user avatar
  • 535
7 votes
2 answers
18k views

How to make remote connection (ssh tunnel) with putty/ssh?

I am trying to make a tunnel between a server and laptop with Putty. The problem is, since the laptop has no public IP address, I have to make a reverse connection. But I really don't know how to do ...
user avatar
6 votes
7 answers
3k views

Multiple command prompts with one SSH connection?

I have a need to do a lot in vim on a remote server which I need to SSH into. I find that it is best if I can look at multiple documents in multiple windows on my desktop, so to do this I open two or ...
cwallenpoole's user avatar
6 votes
1 answer
26k views

SSH tunnel connection refused

I have a remote machine (IP XX.XX.XX.XX) which runs an app written in python/cherrypy which opens a port for http connections on the loopback interface. If I login into the remote machine (using ssh) ...
rlazo's user avatar
  • 163
6 votes
3 answers
10k views

How to tunnel a local port onto a remote server

I have a domain that i bought from DynDNS. I pointed the domain at my ip adress so i can run servers. The problem I have is that I don't live near the server computer... Can I use an ssh tunnel? As I ...
Trevor Rudolph's user avatar
6 votes
2 answers
17k views

SSH local port forwarding to a website

I was refreshing my memory today on setting up ssh tunnels and I came across several sources that describe forwarding some local port to a website. For example: https://www.techrepublic.com/article/...
shwoseph's user avatar
  • 369
6 votes
3 answers
20k views

Finding why a ssh tunnel is not working

I have a remote server that I can SSH into no problem. I have PostgreSQL (ps) set up on the remote server (called 'enc') and local machine, both running on 5432 (the default). The remote server does ...
Doug Miller's user avatar
6 votes
3 answers
3k views

How to set up SSH tunnel between 2 machines behind 2 different NATs

I have Windows PC behind a NAT/Firewall at home, and a Windows PC behind a NAT/Firewall at work. i.e. Neither PC has a publicly visible IP address. On each of the PCs, I am running a Ubuntu VM on ...
Jay Godse's user avatar
  • 161
6 votes
1 answer
1k views

DNS tunneling through an SSH connection looses connectivity

In the Super User question UDP traffic through SSH tunnel, it describes how to tunnel DNS trough a SSH tunnel: First, on the client side, do this: ssh -N -L 6667:localhost:6667 user@server Then, on ...
StackUnderflow's user avatar
5 votes
6 answers
24k views

How to tunnel port 25565 through SSH?

I want to play a game which is hosted on port 25565 (minecraft!), but my university firewall does not allow this port. I have a dedicated server running linux not too far from uni, so I think there's ...
Matt's user avatar
  • 329
5 votes
4 answers
346 views

Secure Connection from Insecure Computer

I am going to be traveling out of the country to a pretty questionable area and I would like to be able to access my online banking while I am away. If I were taking my own computer, this wouldn't be ...
viking's user avatar
  • 524
5 votes
1 answer
1k views

Extend or inherit existing entries in .ssh/config

I have the following entry in my .ssh/config file: Host myhost Hostname localhost User me ServerAliveInterval 30 ProxyCommand ssh -q external-relay /usr/bin/nc -w 90 localhost 9889 ...
ktorn's user avatar
  • 153

1
2 3 4 5
12