LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

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, 01:06 AM   #2
nugat
Member
 
Registered: Sep 2012
Posts: 122

Rep: Reputation: 31
Hi,

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, 02:15 AM   #3
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
Arrow

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




http://www.linuxquestions.org/questi...ng-4175429216/
 
  


Reply


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 08:46 AM
Machine A can't access the network when Machine B goes offline. funkymunky Linux - Networking 3 03-01-2011 09:43 PM
How to run a script to a remote linux machine from a windows machine squirrel001 Linux - Newbie 5 05-04-2009 07:06 PM
Samba add machine script disables machine by default?! deathsfriend99 Linux - Server 0 12-15-2008 05:33 PM
Windows XP machine fails to access Ubuntu machine gwatts Linux - Networking 6 03-04-2007 02:04 PM


All times are GMT -5. The time now is 08:35 AM.

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