Keeping Telnet Session Open
- From: Crist Clark <crist.clark@xxxxxxxxxxxxxx>
- Date: Thu, 26 Jan 2006 17:26:04 -0800
Porting some scripts over from HPUX. This one seems to depend on some
interesting behavior from the HP telnet. It does something like,
telnet host > logfile &
And the idea is that this process just sits in the background writing
output from "host" to the log file.
This doesn't work on Solaris (we're using 9). The Solaris telnet, when
backgrounded in this manner, will immediately tell the other end it's
done (you can watch the TCP FIN go out right away), and things close
right up.
Yes, this doesn't work for a reason. Telnet is a tool for _interactive_
sessions. But before I makes some heads explode by telling them to import
non-Sun software (netcat) or write this all in Perl or something else
that can handle the TCP connectivity natively, does anyone have a way
to trick the telnet into keeping the connection open? I tried something
like,
mkfifo -m 600 /tmp/.dumfifo
telnet host < /tmp/.dumfifo > logfile &
Hoping that the telnet would stay alive waiting for input on the FIFO,
but it doesn't even start until it gets something pushed down the pipe
and then quits. Maybe I'm missing some variant on that which could help?
--
Crist J. Clark crist.clark@xxxxxxxxxxxxxx
Globalstar Communications (408) 933-4387
_______________________________________________
sunmanagers mailing list
sunmanagers@xxxxxxxxxxxxxxx
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
- Follow-Ups:
- UPDATE: Keeping Telnet Session Open
- From: Crist Clark
- UPDATE: Keeping Telnet Session Open
- Prev by Date: V880 with A5000 via 375-0040 (FC-AL HBA FC100/P)
- Next by Date: SAN doubt (while upgrading OS)
- Previous by thread: V880 with A5000 via 375-0040 (FC-AL HBA FC100/P)
- Next by thread: UPDATE: Keeping Telnet Session Open
- Index(es):