Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Enthusiast Zone > Networking > need help with telnet

need help with telnet
Thread Tools
Fresh-Faced Recruit
Join Date: Jun 2007
Status: Offline
Reply With Quote
Jun 26, 2007, 06:58 AM
 
hi all , being my first post this is really basic but i couldn not figure it out in os x.
this is what i want to do :

1.run the following telnet command every hour starting 10.10 pm till 7.10 am

192.168.1.1 23
WAIT "login"
SEND "admin\m"
WAIT "Password"
SEND "admin\m"
WAIT "#"
SEND "reboot\m"
WAIT "#"

2.(not by telnet)at 8.00 am i want the system to automatically shut down.

i tried using cron command but could not make up a script for telnet(i mean i dont know,i am still a wekk old in the world of unix!)

plz explian step by step ,the cron or expect commands for these and also making a script in os x.

please help me in setting these thngs right, otherwise i would have to move on to windows xp/vista which i dont like!
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jun 26, 2007, 08:44 AM
 
i would definitely do this over SSH using public/private key pairs. This way, you don't have to worry about scripting the password exchange, and you'll have that additional security if necessary.

Once you have setup your public/private key pairs, a simple:

ssh username@host reboot

Should work.
     
   
Thread Tools
Forum Links
Forum 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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:48 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2