Discussions
Categories
Groups
Advertisement
Child Item
Home
Topics
Technology & Internet
Computers & Technology
Computers & Technology
Telnetting automatically
Baz_
For my internet I must telnet to the local university server, and every hour I get kicked and have to relogin, so what I was wondering was: Is there anyway of invoking telnet (or a telnet like app) from the command line that will log me in automatically, for example every hour. I've been searching about but couldn't find anything, or perhaps I could write my own, so does anyone have any info on that???
Find more posts tagged with
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of
Advertisement
Advertisement
Comments
moist
Does it kick you after an hour, or after an hour being idle ?
If you can ssh to the machine you could use an rsa key with ssh-agent or pagent which will cache the
passphrase for your key and pass that off to ssh or putty respectively when they need it.
On the other hand you could use expect.
Somthing like...
#!/usr/local/bin/expect
spawn telnet hoost.com
expect "ogin:"
send "my_username"
expect "assword:"
send "my_password\n"
Baz_
****ing hell mate, thats a lot for one breathful. whoo!!
yeah i did something like that using perl and it works like a charm, I'm using windows by the way, going by yer shebang line I would say you're using unix. Indeed with a little further testing, expect is not even a command in Windows, ta for the quick reply though, mucho appreciato:D
Baz_
Baz_
Does anyone know how to get a batch file to exit when its finished???
phaxx
You mean close the window?
er, I think put
@echo
off as the first line. I *think*
Baz_
good man trying that now
<result>
worked like a charm, ta
</result>