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
12
votes
6 answers

SSH access gateway for many servers

Managing multiple servers, in excess of 90 currently with 3 devops via Ansible. All is working great, however there is a giant security problem right now. Each devop is using their own local ssh key to gain access directly to the servers. Each devop…
John
  • 887
  • 4
  • 15
  • 25
12
votes
6 answers

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 -R0:localhost:2222 insecure@server.example.com In…
Tom
  • 3,213
  • 2
  • 20
  • 19
12
votes
5 answers

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 I have to create an SSH tunnel before running…
BenM
  • 748
  • 1
  • 8
  • 13
12
votes
1 answer

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 connection from the client with the legacy…
Will Martin
  • 2,431
  • 5
  • 19
  • 18
12
votes
4 answers

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 normally looks something like this: ssh -l raam -D 9000…
Raam Dev
  • 143
  • 1
  • 7
11
votes
2 answers

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 back of every thing many other Operating systems…
Bond
  • 781
  • 4
  • 12
  • 22
11
votes
2 answers

Forwarding port 3306 on Mac OS X in order to connect to a remote MySQL Database

I'm on Mac OS X 10.6.2 trying to connect to ubuntu server 8.04.1 at linode. ssh -L 127.0.0.1:3306:[[remote ip]]:3306 user@server -N I want to set up ssh tunneling so that I can access a remote mysql server. First of all, I'm told bind: Address…
Jonathan Mayhak
  • 243
  • 1
  • 2
  • 8
10
votes
1 answer

SSH: What's the difference between -L and -R?

I looked at the ssh manual (man ssh) and read the definitions for -L and -R option but don't quite understand the difference. Both seem capable of forwarding requests to a desired host and port. Can someone trying explaining the difference to a…
user526657
  • 103
  • 1
  • 4
10
votes
4 answers

ssh port forwarding with firewall-cmd

I'm trying to do an ssh tunnel into a server behind NAT: ssh from laptop --> Host with port forwarding in firewall --> Get directly into guest (172.16.0.2, behind host NAT). Using iptables on Host - it will work: # iptables -I OUTPUT -d 0.0.0.0/0…
Noam Manos
  • 307
  • 1
  • 2
  • 8
10
votes
1 answer

Multiple Reverse SSH Tunnels using Single Port

I am able to accept reverse SSH connections from multiple remote systems on a single server using a port for each connection: Remote A: ssh -fN -R5000:localhost:22 user@server-ip -p22 Remote B: ssh -fN -R5001:localhost:22 user@server-ip -p22 Remote…
BCCode
  • 101
  • 1
  • 3
10
votes
2 answers

(ssh tunnel?) Access remote server with private IP through a *DIFFERENT* server with public IP

Let's assume the following hosts: localhost : my laptop remoteserver : a server with a public IP which runs a SSH server. private.remoteserver : a server with a private IP which is only accessible from remoteserver. I don't have sudo access to…
David
  • 243
  • 1
  • 2
  • 7
10
votes
5 answers

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 my.home.domain This is giving me a proper shell, no…
Jacob Ewing
  • 201
  • 1
  • 3
  • 6
10
votes
6 answers

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 machines, but in reverse order. Here's the…
Mihai Todor
  • 222
  • 1
  • 3
  • 13
10
votes
2 answers

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 tunnlr.com provides. I've initiated the ssh tunnel…
chris
  • 103
  • 1
  • 1
  • 5
10
votes
5 answers

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 machine. Thanks for your help!
grm
  • 425
  • 2
  • 4
  • 10
1 2
3
57 58