Skip to content

Ssh tunnel proxy traffic and bastion

wordpress meta

title: 'SSH Tunnel Proxy Traffic and Bastion'
date: '2018-07-09T08:28:29-05:00'
status: publish
permalink: /ssh-tunnel-proxy-traffic-and-bastion
author: admin
excerpt: ''
type: post
id: 1225
    - SSH
tag: []
post_format: []

Sometimes you need to test a protocol and only have SSH access through a bastion host. You can display X back for example firefox or you can route traffic through a SSH tunnel. Here is a couple examples:

1. Display back should be fairly common and I don't need to elaborate much. Use -X and connect to the host with firefox.

$ ssh -X -F M-config ociserver1
Last login: Mon Jul  9 07:46:39 2018 from desk01
$ firefox 

URL works

2. SSH Tunnel

$ ssh -L8000: -i oci-M opc@pub.lic.ip.address
Last login: Mon Jul  9 07:36:01 2018 from c-desktop

$ grep ebs /etc/hosts

URL works