![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Disconnecting a telnet session | cooldude | UNIX for Dummies Questions & Answers | 14 | 12-09-2007 08:21 PM |
| Telnet Session to AIX | bluebee | UNIX for Dummies Questions & Answers | 1 | 08-07-2007 03:19 PM |
| Unix Telnet session | mlucas | UNIX for Dummies Questions & Answers | 2 | 08-17-2006 10:26 AM |
| Telnet session does not expire | deepsteptom | Shell Programming and Scripting | 1 | 08-03-2004 11:48 AM |
| telnet session timeout | yls177 | UNIX for Dummies Questions & Answers | 6 | 10-16-2002 09:11 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
{
sleep 2 echo "$user" sleep 2 echo "$password" sleep 2 echo " ls" sleep 10 echo "exit" }| telnet $server I have a machine x and i have executed the above script on machine 'x'. i entered the appropriate user and password in the script and gave the ipaddress of the server in telnet $server. When i executed this script on machine x, telnet started to another machine, took the user name and password and got logged in. It then executed the "ls" and "exit" commands from the script. But i removed the exit command and executed the script, I got the prompt on the other machine, but i am not able to execute any commands and the prompt hangs. HELP ME OUT !!!!!!!!!!!!!!!!!!!! |
|
||||
|
Quote:
|
|
||||
|
Purpose of this Script
Hi,
This is the purpose of this script. Everyday, many times i need to log on to a local unix machine first, then use telnet to connect to remote unix machine using the desired username and password. What my idea is whenever i execute a shell script(contains the ipaddress of remote machine, username, password) on a local unix machine, it gets connected automatically. May be the purpose is not worth but just got eager to know whether it can be done or not. Thanks in advance if you can post the code or modify the script i have sent. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|