?
Solved

Automate telnet login?

Posted on 1998-07-17
5
Medium Priority
?
370 Views
Last Modified: 2010-04-21
Under one unix box, can I automate the process to login the other unix box?
Thanks.
Shane
0
Comment
Question by:xiaoxiangz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 2

Expert Comment

by:mlev
ID: 2008853
Specifically what part of it do you want to automate?
Do you want to be able to type "login_there" and get
a prompt on the remote machine? Or click on an icon in
your WM and have it open an xterm running telnet? Or...?
0
 
LVL 1

Expert Comment

by:Rajkumar_R
ID: 2008854
See man pages for telnet and telnetrc .....if you want to happen it automatically then you should put a script inside .profile which will call telnet
0
 

Author Comment

by:xiaoxiangz
ID: 2008855
Sorry for not being clear. By saying automate telnet, I mean not
type in login name and username everytime. Instead put in a file.
Thanks.
Shane

0
 
LVL 1

Accepted Solution

by:
chytrace earned 80 total points
ID: 2008856
Hi,

  try the following expect script:

-------------- cut here ----------------------------
#!/share/bin/expect -f

spawn telnet host_name
expect "ogin:"
send "your_login\r"
expect "ssword:"
send "your_password\r"
interact
----------------- cut here ----------------------

Hope this helps, for more see 'man expect'.

                Radovan

0
 

Expert Comment

by:ShootThemLater
ID: 2008857
You can try using expect to automate the 'conversation' with the box at the other end and pass it UID etc.

Alternatively, you can look into rlogin.  Check out man 5 rhosts...
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month15 days, 11 hours left to enroll

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question