- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- telnet automatically
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2002 12:13 AM
11-08-2002 12:13 AM
telnet automatically
B^R
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2002 12:38 AM
11-08-2002 12:38 AM
Re: telnet automatically
Create a script mytelnet.sh with below contents
#!/opt/local/bin/bash
(echo "testuser";\
echo "test123";\) | telnet x.x.x.x
Where x.x.x.x is the Ip address of the remote server.
regards,
U.SivaKumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2002 12:38 AM
11-08-2002 12:38 AM
Re: telnet automatically
Create a script mytelnet.sh with below contents
#!/usr/bin/sh
(echo "testuser";\
echo "test123";\) | telnet x.x.x.x
Where x.x.x.x is the Ip address of the remote server.
regards,
U.SivaKumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2002 01:06 AM
11-08-2002 01:06 AM
Re: telnet automatically
(sleep 5
echo
sleep 5
echo
sleep 5
echo ls
sleep 5
echo exit) |telnet hostname
check this link
Clay has a perl script for telnet
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x62777d4cf554d611abdb0090277a778c,00.html
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2002 06:46 AM
11-08-2002 06:46 AM
Re: telnet automatically
type autoexpect -f filename telnet servername
you will go through the login process and when you're done hit the
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2002 07:31 AM
11-08-2002 07:31 AM
Re: telnet automatically
It can be as trivial as this (adapted from the man pages):
use Net::Telnet ();
my $passwd = "topsecret";
my $username = "cstephen";
$t = new Net::Telnet (Timeout => 15,
Prompt => '/bash\$ $/');
$t->open("sparky");
$t->login($username, $passwd);
@lines = $t->cmd("/usr/bin/who");
print @lines;
You can download the Net::Telnet module from www.perl.org/CPAN. It's really hard to beat the simplicity of this method especially when you would also like to automatically add error checking.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2002 08:29 AM
11-08-2002 08:29 AM
Re: telnet automatically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2002 08:46 AM
11-08-2002 08:46 AM