Quantcast
Channel: Active questions tagged expect - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 157

Expect script + automated telnet process between three Linux machines

$
0
0

Is it possible to do the following by expect script?

I have Linux server that connected to linux_machine1 and linux_machine1 connected to linux_machine2

My Linux server have access only to linux_machine1 ( linux server can telnet to linux_machine1 but can’t telnet to linux_machine2 )

But from linux_machine1 I have access VIA telnet to linux_machine2

So my question is:

I need to develop expect script that perform telnet from the Linux server to linux_machine1

then expect will perform telnet to linux_machine2 from linux_machine1 and will copy the /etc/hosts file from linux_machine2 to my Linux server

Is this scenario can be implemented by expect script?

Short example that descript the process:

  ( run expect from Linux server ) --> linux_machine1 --> linux_machine2 
  Linux server          <--   /etc/hosts    from linux_machine2 <--
  • remark - expect script need to be activate from the linux server

Viewing all articles
Browse latest Browse all 157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>