RSS Subscription
Linux Howtos & Tutorials

Enter your email:

Delivered by


NOTE:New tutorials are from LinuxCareer.com

Poll

Do you own or wish to have iPhone?
 


Linux eBooks FREE Download
A guide to programming Linux kernel modules
Introduction to Linux - A Hands on Guide
A Newbie's Getting Started Guide to Linux

Linux from Scratch - Create Your Own Linux System - Free eBook

Linux: The Hacking Solution (v.3.0)

SQLite 3 with PHP Essential Training – Free Video Training Tutorials

This guide will introduce you to the world of GNU/Linux

The GNU/Linux Advanced Administration

A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)

Advanced Bash-Scripting Guide

Set up, maintain, and secure a small office email server

Partner Linux Sites:
How-To.LinuxCareer.com
Jobs.LinuxCareer.com
TuxMachines
Monsterb
LinuxBloggers
AdamsInfo
LinuxScrew
All For Linux

Ssh port forwarding

Article Index
1. Enable telnet server on remote host
2. Create ssh tunnel to remote host
3. Telnet to remote host via ssh port forwarding

SSH Port Forwarding allows us to create a very simple "VPN" which lets you to secure insecure protocols such us telnet or ftp. When creating encrypted ssh connections a client needs to be connected to a ssh server on a remote host, thus creating a ssh tunnel via which an insecure information will travel. In this scenario, we are going to use ssh port forwarding to create an encrypted tunnel for telnet connection.

1. Enable telnet server on remote host

Let us first confirm that the telnet server is running on a remote host:

$ netstat -ant | grep 23 

remote server port 23

2. Create ssh tunnel to remote host

In this example you will open port 4500 on your local host and tunnel it to the port 23 on your remote host. You do not have to do this as a root. Since we are using a port higher than 1024 a ordinary user is able to create this port forward connection. Keep in mind that a tunnel is erected only when the ssh connection is running.

# ssh -L 4500:127.0.0.1:23 linuxconfig.org 

create tunnel
At this point, every connection which uses port 4500 on the localhost will be redirected to remote port 23.

3. Telnet to remote host via ssh port forwarding

Before we attempt to telnet to a remote host via tunnel, we need to ensure that the tunnel is still running:

# netstat -ant | grep 4500 

ssh port forwarding
Once we know that the tunnel is still running we can attempt to telnet on local port 4500.

# telnet localhost 4500 

Telnet to remote host via ssh port forwarding

Share this linux post:

Submit Ssh port forwarding in Delicious Submit Ssh port forwarding in Digg Submit Ssh port forwarding in FaceBook Submit Ssh port forwarding in Google Bookmarks Submit Ssh port forwarding in Stumbleupon Submit Ssh port forwarding in Technorati Submit Ssh port forwarding in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.


Linux eBooks FREE Download