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.


Recommended Answers

All 3 Replies


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.

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"
do script telnet
delay 1
end tell

I would like to Telnet data to and from an ethernet device, as well as command which iTune song to play based on this data. Is this all possible from within an apple script?

How do you loop in apple script? I'd like to have the script loop waiting for Telnet data from the device. When it meets certain criteria I'd like to execute another part of the script. Possible?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.