- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Automatic telnet ( non-interactive telnet) within ...
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
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
тАО02-19-2006 03:16 PM
тАО02-19-2006 03:16 PM
Automatic telnet ( non-interactive telnet) within Unix servers
I have an urgent requirement to automatic telnet few Linux and Unix servers through some script and then run a health status check script.
I have tried a Perl based script.
============================================
#!/usr/bin/perl -w
# perl telnet1.pl username password hostname
use Net::Telnet;
# Get number of command-line arguments.
$num_args = scalar( @ARGV );
if ( $num_args < 2) {
die "Usage: username password hostname\n";
}
$username = shift;
$password = shift;
$hostname = shift;
$tel = Net::Telnet->new(Host => $hostname,
Input_log => тАШtelnet.txtтАЩ,
Timeout => 30 );
$tel->login($username, $password)
or die "Unable to establish telnet connection $!";
# Issue a command on the remote system.
@df_result = $tel->cmd("df");
foreach $line (@df_result) {
print "$line";
}
$tel->close();
# telnet1.pl
===============================================
$perl telnet1.pl username password hostname
this script is working on non-interactive telnet with localhost but did not connecting with remote hosts.
Please guide what I need to modify here or if someone is using any script for such situation,PLEASE PLEASE send me.
Thanks a lot ..........
Anil
anil_garg5@yahoo.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2006 10:40 PM
тАО02-19-2006 10:40 PM
Re: Automatic telnet ( non-interactive telnet) within Unix servers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2006 10:45 PM
тАО02-19-2006 10:45 PM
Re: Automatic telnet ( non-interactive telnet) within Unix servers
Only the telnet service is configured in all the remote servers. ssh service is disaled in all the server, so I have no choice..How can tackle this in present situation? Please guide.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2006 12:58 AM
тАО02-20-2006 12:58 AM
Re: Automatic telnet ( non-interactive telnet) within Unix servers
1) telnetd is installed and running on your remote Linux&Unix machines.
2) Your mgmt host is allowed to connect to all remote hosts (add "in.telnetd:
Regards,
Sergejs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2006 01:08 AM
тАО02-20-2006 01:08 AM
Re: Automatic telnet ( non-interactive telnet) within Unix servers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2006 02:07 AM
тАО02-20-2006 02:07 AM
Re: Automatic telnet ( non-interactive telnet) within Unix servers
where it is missing.
If you want to do health checks then
seriously consider installing nagios
or one of the programs of its ilk.
Both options are much more secure.
Also if you are connecting as root, this
may be prevented (quite rightly) by
/etc/securetty, or a similar file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2006 10:47 PM
тАО02-20-2006 10:47 PM
Re: Automatic telnet ( non-interactive telnet) within Unix servers
I have installaed sshd on Linux machine.
but unable to install sshd on the Solaris machine.I am still working on it.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2006 11:22 PM
тАО02-20-2006 11:22 PM
Re: Automatic telnet ( non-interactive telnet) within Unix servers
a) expect
b) telent + piping() as,
(
echo "root"
sleep 2
echo "
sleep 2
echo "command to execute"
sleep 2
echo "exit"
) | telnet machine
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2006 11:24 PM
тАО02-20-2006 11:24 PM
Re: Automatic telnet ( non-interactive telnet) within Unix servers
sometime telnet service is not enabled in all machines of *NIX. It depends upon your machines. Try to check all the machines for common login service availablity. Then automate with perl or expect scripting or telnet + piping.
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-21-2006 02:48 AM
тАО02-21-2006 02:48 AM
Re: Automatic telnet ( non-interactive telnet) within Unix servers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2006 03:52 AM
тАО02-27-2006 03:52 AM