Telnet and Apple Script
Hi Folks, hope this is in the right section.
I need to Telnet to a machine from OSX, the machine is a linux box, when i do this from the terminal (or iterm) it connects but prompts me immediately with "password", it seems to be skipping the "logon" bit, but if i hit return it then prompts me for my login then password and i can get in. I have been playing with Applescripts with the telnet command and the terminal but still cant get it to go right. What i need to do is add a carriage return in when it prompts me for the password, this would then take me to the logon bit which i need. how does one do this in applescript??
Bit long winded i know but there you go! Any help would be really helpful.
gn0m3
gn0m3
Junior Poster in Training
67 posts since Apr 2005
Reputation Points: 10
Solved Threads: 0
Hello,
There's an easier way. Simply use -l username as a command-line argument to telnet when you start it. See man telnet for more information.
John A
Vampirical Lurker
7,630 posts since Apr 2006
Reputation Points: 2,240
Solved Threads: 339
thanks for the advice, in the end i created a small apple script which sorted it right out. will put below in case anyone else has this issue!
set telnet to "telnet -K ip address"
tell application "Terminal"
run
do script telnet
delay 1
end tell
gn0m3
Junior Poster in Training
67 posts since Apr 2005
Reputation Points: 10
Solved Threads: 0