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

learn more… | top users | synonyms

19
votes
7answers
6k views

How to configure a shortcut for an SSH connection through a SSH tunnel

My company production servers (FOO, BAR...) are located behind two gateway servers (A, B). In order to connect to server FOO, I have to open a ssh connection with server A or B with my username ...
17
votes
5answers
6k views

ssh tunneling only access

Is it possible to configure ssh (on linux) to allow access for tunneling only? Ie user can setup tunnels but cannot get a shell/access files?
17
votes
9answers
12k views

How to set up disk cloning with dd, netcat and ssh tunnel?

I would like to copy stuff in bulk (reimage disk using dd) with netcat from host A to B via ssh encrypted channel on Linux. What commands should I type on both ends?
9
votes
4answers
11k views

What is the difference between Local/Remote/Dynamic SSH tunneling?

In Putty, there are three tunneling options: Can someone explain what is the difference between them?
8
votes
2answers
13k views

How to setup ssh tunnel to forward ssh?

I have computer with Ubuntu behind router that I can't configure. However I want to have ssh access to that computer. I think it is possible with ssh tunneling, but I don't know how to do it. I have ...
8
votes
6answers
7k views

Routing all traffic thru socks proxy using ssh -D

is it any easy way to route all traffic through a ssh proxy with -D? I can configure individual specific applications to do this, but I would like a configuration that routes all the traffic on the ...
7
votes
3answers
1k views

Copy data through SSH tunnel over multiple hops

We have two main environments in question: Development and QA Each environment has two servers: Jump Box Application server In order to connect to the application server, you must connect to the ...
7
votes
4answers
946 views

Securing NFS against SSH tunneling

I was idly reading http://nfs.sourceforge.net/nfs-howto/ar01s06.html trying to understand why localhost exports were bad when I got to the section "6.4. Tunneling NFS Through SSH". Everything in that ...
7
votes
2answers
4k views

Can I use an SSH tunnel to access a web server that's listening on a different IP/Port on the same server?

CentOS 5.x I've got a web server that isn't quite ready for general availability but I'd still like to test some things remotely. Can I leverage an SSH tunnel to connect to the server and then use ...
7
votes
5answers
4k views

SSH Tunnel as a Windows Service

I want to set up an SSH tunnel to run as a Windows service, I need to be able to set it up using only the command line so this counts out any software that doesn't include a command line version. ...
7
votes
4answers
1k views

Reverse SSH tunnel: how can I send my port number to the server?

I have two machines, Client and Server. Client (who is behind a corporate firewall) opens a reverse SSH tunnel to Server, which has a publicly-accessible IP address, using this command: ssh -nNT ...
7
votes
2answers
4k views

How can I close SSH tunnel gracefully?

I have open tunnel with ssh -2 -N -L 5001:localhost:1019 eonil@test.local The tunnel is working good, but I have to Ctrl+C or Ctrl+D to force quit the tunnel. How can I close the tunnel gracefully? ...
7
votes
2answers
2k views

Connecting to MySQL securely - MySQL's SSL vs Stunnel vs SSH Tunneling

We have a PHP application which connects to a MySQL server, and we wish to secure connections between the web & application servers and the database. At peak times, the web servers make many ...
6
votes
5answers
4k views

Can I create SSH to tunnel HTTP through server like it was proxy?

Say I have a server and client. I need to create connection from client to a website through server like it was proxy. Is it possible to do this using a SSH tunel, or do I have to install some proxy ...
6
votes
3answers
374 views

SSH via 3rd Machine

Local Computer (Fedora) --SSH--> Server1 --SSH--> Server2 In some environments I work in, we have to use "jump boxes" where you ssh to one server in order to get to another server. Is ...
6
votes
2answers
1k views

Block SSH tunneling to IP, allow only for certain users

I need to setup SSH to block all access to a certain IP on port 555. Only a small group of users should be allowed to tunnel to that IP. Currently I have the following stuff in my sshd_config Match ...
6
votes
2answers
2k views

How can ssh allowed to setup remote port forwarding but not execute commands?

How can an SSH command be setup to allow port forwarding but not execute commands. I know that the ssh login can use -N to stop commands executing, but can the ssh config file be setup to disallow ...
5
votes
5answers
4k views

Temporary SSH Tunnel for backup purposes

I'd like to write a shell script (currently using bash) to automatically back up the content of several MySQL schemas on a remote server. The remote server is locked down to only allow SSH access so ...
5
votes
3answers
1k views

Why does logging out of an SSH session hang when using port-forwarding?

I use dynamic SSH port-forwarding (-D) and normal SSH port-forwarding (-L or -R) for many different things, including adding a layer of encryption to my wireless web traffic. The command I use ...
5
votes
5answers
6k views

How can I get list of open SSH tunnels?

How can I get list of open SSH tunnels? I'm using Mac OS X client connected to FreeBSD server. I'm trying to query open tunnels on the client.
5
votes
1answer
2k views

Can I configure VSFTPD to listen only to localhost?

I have a legacy app that needs FTP and cannot do SFTP. My solution is: put an FTP server in place using VSFTPD configure the firewall to accept port 21 connections only from localhost Set up an SSH ...
5
votes
2answers
13k views

how to tunnel Windows Remote Desktop through ssh using a linux box?

I have two physical servers in my home network, linux (192.168.8.x) and windows server 2008 (192.168.8.y). The linux server ist accessible from outside by ssh on a non-standard port (say 23008). How ...
5
votes
10answers
9k views

Forward port to another Ip/port

I recently found out that my ISP disables port 135. I have a server and personal computer behind my router. A friend and I are working on a programming project and are running into some sql issues ...
5
votes
2answers
4k views

Reverse SSH Tunnel

I am trying to forward web traffic from a remote server to my local machine in order to test out some API integration (tropo, paypal, etc). Basically, I'm trying to setup something similar to what ...
5
votes
2answers
10k views

How to start a reverse tunnel with PuTTY?

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. ASCII Artwork: SERVER(PORT:6000) ...
5
votes
2answers
2k views

Running multiple services on Port 443, Tunnel SSH over HTTPS

Situation: I want to tunnel SSH sessions through HTTPS. I have a very restrictive firewall/proxy which only allows HTTP, FTP and HTTPS traffic. What works: Setting up a tunnel through the proxy to a ...
5
votes
2answers
742 views

How to Configure Secure Connectivity between Multiple Subnets

I have the following setup 2 x linode vps 1 x lab (physical) running 4 vps My goal is to make it so all nodes act as if they are on the same LAN. This will allow me to alter IPTable rules, to allow ...
5
votes
3answers
4k views

SSH back to the local machine from a remote SSH session

I'm trying to do something rather unusual (for me anyway) with SSH and I can't get it to work, hopefully you can help. I want to establish a connection to a remote server from my Mac using SSH. So ...
5
votes
2answers
3k views

I need a reverse proxy solution for SSH

Hi here is a situation I have a server in a corporate data center for a project. I have an SSH access to this machine at port 22.There are some virtual machines running on this server and then at the ...
4
votes
3answers
2k views

Forward SSH through SSH tunnel

My situation : Me(localhost) -> Server A(ip:100.100.100.100) =>(server B(ip:192.168.25.100),server....) i'm able to SSH into server since it has a true ip if i then want to connect to server b, i ...
4
votes
3answers
1k views

Tunneling all TCP and UDP traffic through a Server?

On a Linux or Windows system, how would it be possible to tunnel all TCP/UDP packets through a thirdparty server? What would one use, does it work with SOCKS5, OpenVPN or SSH?
4
votes
2answers
2k views

Can I limit my SSH Tunneling Speed?

So, I'm using my ssh tunneling to download some content which is blocked by my office. But, I don't want the admin to notice it, therefore I want to limit the connection to, eg: 20KB/s. How can I do ...
4
votes
2answers
2k views

How to bestly setup a ssh tunnel for access to a remote network (Linux)

My situation: I want to remotely debug my c++ application with gdbserver and eclipse. Eclipse is running on my local workstation (in the 192.168.0.0 network) and gdbserver is running on a ...
4
votes
2answers
2k views

How can I use nagios to monitor ssh tunnels?

I have a server that is used a middleman for a bunch of reverse ssh tunnels. I want to use nagios on that server to monitor that all of those ssh tunnels are up. Essentially I want to do the nagios ...
4
votes
5answers
2k views

SSH remote access vpn tunnel

I have two machines both running CentOS linux, one is public facing machine with a real ip address (foo). The other is at a client's site behind a very restrictive firewall and with no real ip and no ...
4
votes
4answers
3k views

How do I log SSH port forwards?

Say I have an SSH server, with port forwarding enabled. It's fairly simple for a user to set up an SSH connection and forward BitTorrent traffic or other illegal or abusive traffic over it. How can I ...
4
votes
4answers
4k views

SSH Tunnel for Remote Desktop via Intermediary Server Part II

I asked previously how to configure 2 SSH tunnels using an intermediary server in order to run Remote Desktop through them and I managed to make it work. Now, I'm trying to do the same, using the same ...
4
votes
4answers
2k views

ssh port forwarding freezes after 10 simultaneous connections

I am using port forwarding to utilize proxy server which is on remote machine. Remote machine hostname is remotemachine. Proxy is listening on 8118 port. I am translating this port to local port ...
4
votes
2answers
306 views

How can a SSH host process detect which ports have been forwarded by the client (-R not -L)

(I can't decide between posting this here or on SuperUser but since this is for a sysadmin purpose, this seems like a better fit) I have a situation where SSH clients will request a port forward ...
4
votes
3answers
3k views

ssh tunnel error “ssh_exchange_identification: Connection closed by remote host”

I'm trying to use an ssh tunnel from my office machine to my home machine, and get an error when I try to use it. What I'm doing is starting one shell like so: ssh -gL 12345:my.home.domain:22 ...
4
votes
2answers
581 views

How to link multiple SSH tunnels together in Linux

I have the following situation: A -----|------ B -----|------ Work Work can SSH into B, and A can SSH into B, but apart from that everything is firewalled. What I would like to do is in effect ...
4
votes
3answers
12k views

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 ...
3
votes
2answers
4k views

ssh root@domain - How to specify a password as well?

I need to write a script that backs up databases on my old server and moves them to my new server. I have about 150 to so need this to be automated. I have found this: $ mysqldump -u username ...
3
votes
5answers
6k views

How secure is webdav? Is smb tunneling over ssh (with putty) a better solution?

How secure is webdav? Is smb tunneling over ssh (with putty) a better solution? What do you prefer?
3
votes
4answers
7k views

If I am using SSH for a SOCKS proxy, do DNS connections go through it?

I am using ssh -D 8080 my server to create a SOCKS proxy. I'm then configuring OS X to use localhost:8080 as a SOCKS proxy. I'm using this to access the internet without being monitored. I'm using ...
3
votes
4answers
338 views

Copy directory using ssh tunnel

The following command is working as expected. ssh soak@10.10.10.11 "ssh soak@10.199.199.191 'cat test.txt'" > /home/shantanu/test.txt What I need to do is to copy the entire directory instead of ...
3
votes
2answers
2k views

reverse ssh tunnel listens on wrong interface

I'm working with a server that is behind a firewall. I have established an ssh tunnel to an intermediate server in the internet like this: remoteuser@behind_fw$ ssh -N -f -R 10002:localhost:22 ...
3
votes
1answer
440 views

cannot connect to mysql on AWS through ssh tunnel

I'm trying to break down the task of doing AWS debugging on rubymine into smaller chunks. I would like to connect to the mysql server running on AWS. So I did the following: first: Establish an ssh ...
3
votes
2answers
97 views

Redirecting SSH through a machine

I'm looking for the simplest way to SSH from my local machine to a remote server through a server in the middle. If there's a permanent way to do this even better.
3
votes
1answer
222 views

How to make ssh fail if port forwarding fails

I have a bash script that runs ssh to create a port forward, using a command like this: ssh -N -i keyfile -L 1000:localhost:22 *remote_ip* There are occasions where the listen port may be busy, so ...