Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-04-2012, 10:49 AM   #1
LQ Newbie
Registered: Oct 2012
Posts: 3

Rep: Reputation: Disabled
Need to access 3rd machine using script from 1st Machine

Dear Sir/Madame,
I have Machine A (my linux machine), Machine B (jumpstation through which we access internal network machines, accessed via ssh) and Machine C (internal network machine which is accessed via ssh as well).
I want to run PERL Net::Expect::SSH module based script which will access machine C from machine A by going through machine B because only machine B can access the internal network. How can I access machine C from machine A without having to do an ssh login into machine B manually. I just want the script to run on machine A and get access to machine C transparently. Can I use ssh tunnel; if yes, then how to do this. Please explain.
All the 3 machines are Linux machines running ssh.
Thanks in advance for your help.
Old 10-05-2012, 12:06 AM   #2
Registered: Sep 2012
Posts: 122

Rep: Reputation: 31

I'd do this with port forwarding using iptables. just pick a TCP port, say 2222, and have B redirect ssh inbound requests on that port (ostensibly from A) to port 22 of C.
Old 10-05-2012, 01:15 AM   #3
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled

Im also looking after the same scenerio here is my post .But you can achive the server using port forwarding


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to access a windows machine GUI from a linux machine using ssh obarhleam Linux - Newbie 6 07-11-2012 07:46 AM
Machine A can't access the network when Machine B goes offline. funkymunky Linux - Networking 3 03-01-2011 08:43 PM
How to run a script to a remote linux machine from a windows machine squirrel001 Linux - Newbie 5 05-04-2009 06:06 PM
Samba add machine script disables machine by default?! deathsfriend99 Linux - Server 0 12-15-2008 04:33 PM
Windows XP machine fails to access Ubuntu machine gwatts Linux - Networking 6 03-04-2007 01:04 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:09 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration