ksh telnet script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ksh telnet script
# 1  
Old 12-14-2005
Error ksh telnet script

I am trying to write a ksh script of using telnet.
On server1, I have a script that wants to telnet to server2 and run it on server2. Then after finish, brings back information to server1. Is it possible? How can I write it on ksh?

Any feekback is appreciated.

Last edited by rwunwla; 12-14-2005 at 06:00 PM..
# 2  
Old 12-14-2005
Here is a script that does that...
changepass automate password changes on multiple systems
# 3  
Old 12-15-2005
Thanks for the reply.
In your answer, at the section 1 part 3, the script tried to delete the output file at the remoted server or you meant to delete at the local server?
After FTP the output file back to the local server at part 2, I assume you want to delete the output file at the remote server. Therefore, the part 3 of section 1 should somehow use telnet command statement like in part 1. right?
can you please help me to clearify my confusion?

Million thanks.

Robert
# 4  
Old 12-15-2005
In section 1 part 3 the script is deleting the file from the local server, not the remote server. After the password is changed, it will ftp to the remote server again, using the new password, and retrieve the file a second time. This guarantees that the password change took effect. The remote file is then deleted.
# 5  
Old 12-16-2005
Maybe this is a really dumb question but: why don't you use rsh/rexec/remsh/et al. for this very purpose? Aren't these tools designed exactly for your situation?

bakunin
# 6  
Old 12-16-2005
The BSD R-commands are the least secure networking commands ever written. Many sites prohibit their use.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Telnet Script

Hello, I wrote a script for doing telnet.However the requirement got changed and now I have to write a telnet script that will 1. Do the telnet from all the virtual ips in a box(Ex: x.x.x.x is the box ip, and x.x.x.1,x.x.x.2 etc are virtual ips associated with that box.) 2. The port range... (3 Replies)
Discussion started by: coolkid
3 Replies

2. Shell Programming and Scripting

KSH script to run other ksh scripts and output it to a file and/or email

Hi I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email. For example ------- Script ABC ------- a.ksh b.ksh c.ksh I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies

3. Shell Programming and Scripting

Using telnet inside a ksh

Hello, i am trying to use telnet inside of a ksh script. i would like to do like the following: #!/bin/ksh ... user="user" hostname="hostname" telnet -l $user $hostname |& wait #end of the ksh and with this piece of code, i would like to telnet another machine, and let the user use... (4 Replies)
Discussion started by: Jidma
4 Replies

4. Shell Programming and Scripting

KSH: Test telnet and exit

Hi, I need to do a test Telnet in KSH and if the connection is good then disconnect the telnet session with out logging in and without exiting the shell script. Example output of a good connection: $telnet xxx.xx.xx.xxx xxxx Trying xxx.xx.xx.xxx... Connected to xxx.xx.xx.xxx. Escape... (1 Reply)
Discussion started by: calex
1 Replies

5. Shell Programming and Scripting

import var and function from ksh script to another ksh script

Ih all, i have multiples ksh scripts for crontab's unix jobs they all have same variables declarations and some similar functions i would have a only single script file to declare my variables, like: var1= "aaa" var2= "bbb" var3= "ccc" ... function ab { ...} function bc { ... }... (2 Replies)
Discussion started by: wolfhurt
2 Replies

6. Shell Programming and Scripting

tracing a ksh script within a ksh script

I normally trace a script with the ksh -x <script name> and redirect strderr to file. But if you have a script like the examble below...... vi hairy bear=`grep bear animals` if then ksh more_animals fi If I ksh -x hairy it won't trace "more_animals" unless I put a -x in it. Is... (1 Reply)
Discussion started by: shorty
1 Replies

7. Shell Programming and Scripting

executing a ksh script from another ksh script

Hi, I'm new to unix scripting.How can i call a script from another script. I have a.ksh and b.ksh .I have to call b.ksh from a.ksh after it is successfully exceuted. I tried using #!/bin/ksh -x in a.ksh and at the end i have used /path/b.ksh My problem is it is executing only a.ksh.it... (6 Replies)
Discussion started by: ammu
6 Replies

8. UNIX for Dummies Questions & Answers

telnet through script

Hi, How to write a script to perform telnet/ftp operation. Also please refer some site to get reference about shell scripting. Thanks in advance -Arun. (1 Reply)
Discussion started by: arun.viswanath
1 Replies

9. Shell Programming and Scripting

telnet with ksh

please i need to make telnet in an script but i cant use delay into the instruction because i dont know how many time takes an instruction to compleate in the other computer.How can i do? is there any form to do that?? please help sorry for my english.... (2 Replies)
Discussion started by: taboaspedro
2 Replies

10. UNIX for Advanced & Expert Users

telnet with ksh

please i need to make telnet in an script but i cant use delay into the instruction because i dont know how many time takes an instruction to compleate in the other computer.How can i do? is there any form to do that?? please help sorry for my english.... (1 Reply)
Discussion started by: taboaspedro
1 Replies
Login or Register to Ask a Question